Comments (20)
from sfwbar.
Thanks for the quick turn around!
It does indeed fix the problem above, but does introduce other issues:
- left click on nm-applet should show what is not right click, and right clicking on nm-applet should show (attached image)
- the left/right clicks for zoom is accurate
- slack's normal left click menu now only shows on right click only (left click does nothing)
from sfwbar.
Thank you for testing this. Can you please check if middle click gets you the menu you expect to see under either button? I suspect we may be running into the flipside of https://bugs.launchpad.net/ubuntu/+source/libappindicator/+bug/1910521
from sfwbar.
Middle click does nothing
from sfwbar.
I just tried nm-applet 1.30 on my machine. I get the menu shown in the screenshot above. in sfwbar, I get it on a right click, in waybar, I get this menu on both left click and right click. Do you get another menu on left click in waybar? Which version of nm-applet do you use?
from sfwbar.
network-manager-gnome/testing,unstable,now 1.30.0-2 amd64 [installed]
so looks like same version. On waybar I don't get the menu in the screenshot above but instead the one i currently get on right click in sfwbar (for both left and right click). In JWM I get the menu in screenshot on right click.
from sfwbar.
This "left click doing nothing right click showing what left click should be" behavior is also happending for package-update-indicator/testing,unstable,now 8-2 amd64 [installed]
so don't think it is a nm-applet thing.
from sfwbar.
Ok, so the only difference from waybar is the left click? waybar pops up the same menu as on right click and sfwbar does nothing?
JWM provides a freedesktop tray I believe. That's an X11 based protocol and won't work natively on wayland. The only way to replicate this is to use xembedsniproxy and Xwayland (this will produce ugly looking icons and menu's popping up in the center of the screen).
from sfwbar.
Ok, so the only difference from waybar is the left click? waybar pops up the same menu as on right click and sfwbar does nothing?
Correct.
JWM provides a freedesktop tray I believe. That's an X11 based protocol and won't work natively on wayland. The only way to replicate this is to use xembedsniproxy and Xwayland (this will produce ugly looking icons and menu's popping up in the center of the screen).
Don't think that is the right solution. You did mention that you saw (attached) on right click? If so on left click you should see something else and if that is the case you have correct behavior.
from sfwbar.
I see the above (or a very similar menu at least) on both left and right click in waybar.
The left click behaviour looks like a difference between the StatusNotifierIcon spec and the libappindicator implementation of the spec. Per spec, the tray (StatusNotifierHost) should send Activate event on left click, unless application sets ItemIsMenu property to true, in which case ContextMenu event is sent or menu is popped up. libappindicator seems to popup a menu on left click regardless of ItemIsMenu setting (which makes sense since bug report I linked earlier mentions that libappindicator doesn't support the Activate event).
from sfwbar.
from sfwbar.
X11 left click menu is different then the one above. The one above should be the right click
from sfwbar.
Ok, it looks like with the X tray (freedesktop tray) nm-applet uses 2 menu's, one for connections and one for settings. With StatusNotifierItem tray, it combines them into a single menu. This is because SNI only supports one menu (second menu can be implemented by the applet itself, but it can't be positioned gracefully). So in wayland we'll only have the one menu version.
This still leaves the question of left mouse button click. I'm not too keen to emulate the libappindicator behaviour, as it goes against the SNI spec and would break applets that actually use Activate event. It would be possible to add a tray property to allow switching the behaviour between SNI spec and libappindicator implementation.
from sfwbar.
That sounds like a good approach. Defaulting to SNI spec behavior seems like the best thing to do.
from sfwbar.
Is waybar not following the SNI spec because it uses left and right for the same action for nm-applet which is more intuitive imo. Maybe follow SNI, if there is no left click action then invoke right click?
I will report shortly back about different indicator.
from sfwbar.
Hmm, either SNI spec is broken or the way people implementing their indicators... package-update-indicator
has two different menus depending on left and right click. Waybar shows the same on both left and right click. Sfwbar show only on right click.
Both don't show the right click menu to quit out.
If someone had xfce4 panel or something more mainstream we could better compare the behavior.
from sfwbar.
from sfwbar.
Tested on plasma (wayland) and it looks like tray icons in general are just lame for wayland. I think if we do as above ie. follow SNI spec and set rightclick action to left click (if an action does not exist) in other words mimic waybar's functionality we should be good.
from sfwbar.
Ok, I looked at how Waybar handles this and it looks like it just assumes that ItemIsMenu set tot TRUE unless it's set as FALSE. Since libappindicator tray items don't have ItemIsMenu property defined, it handles left click as a menu popup. I changed this property to be TRUE by default and we should now have the same behaviour as with waybar.
from sfwbar.
Tested and it all cherry! Thanks again!
from sfwbar.
Related Issues (20)
- icons in general need a sane default HOT 9
- segfault HOT 6
- [feature request] programtic way to reload config HOT 15
- beta10 segfaults on start with default config HOT 2
- setMonitor confusion HOT 24
- sfwbar-git on AUR HOT 3
- sfwbar goes to 100% CPU and freezes UI HOT 27
- [feature request] Logic with multiple monitors HOT 15
- default sfwbar.config needs ToggleMinimize & ToggleMaximize functions for winops menu HOT 5
- GTK4 migration HOT 5
- Carla: audio plugin with custom UI are not displayed on the taskbar HOT 2
- More elegant failures HOT 9
- Crash in beta 11 using icons in menu HOT 9
- Floating panel HOT 2
- taskbar: Is there a way to filter apps by title to avoid show them in the taskbar? HOT 6
- How to theme taskbar group HOT 2
- Taskbar grouping when only 1 instance is running HOT 2
- Menus only close by mouse clicking a GTK area. HOT 3
- occasional crash when viewing tooltip HOT 104
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sfwbar.