Giter Site home page Giter Site logo

Weird tray icon (zoom) behavior about sfwbar HOT 20 CLOSED

keshto avatar keshto commented on June 10, 2024
Weird tray icon (zoom) behavior

from sfwbar.

Comments (20)

LBCrion avatar LBCrion commented on June 10, 2024

from sfwbar.

keshto avatar keshto commented on June 10, 2024

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)
    Screenshot from 2023-03-23 11-18-21
  • 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.

LBCrion avatar LBCrion commented on June 10, 2024

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.

keshto avatar keshto commented on June 10, 2024

Middle click does nothing

from sfwbar.

LBCrion avatar LBCrion commented on June 10, 2024

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.

keshto avatar keshto commented on June 10, 2024

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.

keshto avatar keshto commented on June 10, 2024

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.

LBCrion avatar LBCrion commented on June 10, 2024

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.

keshto avatar keshto commented on June 10, 2024

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.
image

from sfwbar.

LBCrion avatar LBCrion commented on June 10, 2024

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.

keshto avatar keshto commented on June 10, 2024

from sfwbar.

keshto avatar keshto commented on June 10, 2024

X11 left click menu is different then the one above. The one above should be the right click

from sfwbar.

LBCrion avatar LBCrion commented on June 10, 2024

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.

Consolatis avatar Consolatis commented on June 10, 2024

That sounds like a good approach. Defaulting to SNI spec behavior seems like the best thing to do.

from sfwbar.

keshto avatar keshto commented on June 10, 2024

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.

keshto avatar keshto commented on June 10, 2024

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.

LBCrion avatar LBCrion commented on June 10, 2024

from sfwbar.

keshto avatar keshto commented on June 10, 2024

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.

LBCrion avatar LBCrion commented on June 10, 2024

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.

keshto avatar keshto commented on June 10, 2024

Tested and it all cherry! Thanks again!

from sfwbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.