StatusNotifierItem: fix right click doing nothing on the tray icon in Waybar - #3388
StatusNotifierItem: fix right click doing nothing on the tray icon in Waybar#3388EinBaum wants to merge 1 commit into
Conversation
… waybar The dbusmenu object never declared any properties. Waybar tries to read Version first, that fails, and it falls back to ContextMenu, which blueman doesn't implement. The menu never opens. Declare Version, TextDirection and Status.
|
There was a problem hiding this comment.
Waybar checks whether the dbusmenu declares a Version, but it didn't. Then the context menu never opens.
sigh... Note that waybar only added that recently and it's not in a release, so there is some hope. 🙈
Declare Version, TextDirection and Status. (they are mandatory in the spec)
What spec?
What we have for dbusmenus is basically the D-Bus introspection XML, which doesn't declare anything mandatory or optional, and the reference client's behavior, which treats all properties as optional.
| properties={"Version": "u", "TextDirection": "s", "Status": "s"}) | ||
|
|
||
| self.Version = 3 | ||
| self.TextDirection = "" |
There was a problem hiding this comment.
This is out-of-spec and a no-op in the reference client
|
|
||
| self.Version = 3 | ||
| self.TextDirection = "" | ||
| self.Status = "normal" |
There was a problem hiding this comment.
Pointless as well, as it's the default
| super().__init__(None, "com.canonical.dbusmenu", "/org/blueman/sni/menu", Gio.BusType.SESSION, | ||
| properties={"Version": "u", "TextDirection": "s", "Status": "s"}) | ||
|
|
||
| self.Version = 3 |
There was a problem hiding this comment.
Did you actually try this? It should give you a menu that does not work.
It would work with versions 1 or 2. The choice is mostly arbitrary, with 2 being the slightly better fit, which is why I described in #2599 that I'm not keen to advertise any arbitrary, unspecified, messy-library-based version.
Anyway, if waybar is eager to randomly check for the presence of the Version property, we probably need to
|
#2599 would fix it too. |



I use Waybar to display the blueman icon in the tray.
Waybar checks whether the dbusmenu declares a Version, but it didn't.
Then the context menu never opens.
Declare Version, TextDirection and Status. (they are mandatory in the spec)