Skip to content

StatusNotifierItem: fix right click doing nothing on the tray icon in Waybar - #3388

Closed
EinBaum wants to merge 1 commit into
blueman-project:mainfrom
EinBaum:sni-menu-dbus-properties
Closed

StatusNotifierItem: fix right click doing nothing on the tray icon in Waybar#3388
EinBaum wants to merge 1 commit into
blueman-project:mainfrom
EinBaum:sni-menu-dbus-properties

Conversation

@EinBaum

@EinBaum EinBaum commented Aug 29, 2026

Copy link
Copy Markdown

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)

… 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.
@sonarqubecloud

Copy link
Copy Markdown

@infirit
infirit requested a review from cschramm August 29, 2026 11:53

@cschramm cschramm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 = ""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is out-of-spec and a no-op in the reference client


self.Version = 3
self.TextDirection = ""
self.Status = "normal"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cschramm cschramm Aug 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@EinBaum

EinBaum commented Aug 30, 2026

Copy link
Copy Markdown
Author

#2599 would fix it too.
So this PR is not needed.

@EinBaum EinBaum closed this Aug 30, 2026
@EinBaum
EinBaum deleted the sni-menu-dbus-properties branch August 30, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants