Skip to content

fix(tray): fall back when dbus menu is unavailable - #5238

Open
nanomatters wants to merge 1 commit into
Alexays:masterfrom
nanomatters:fix/sni-native-context-menu
Open

fix(tray): fall back when dbus menu is unavailable#5238
nanomatters wants to merge 1 commit into
Alexays:masterfrom
nanomatters:fix/sni-native-context-menu

Conversation

@nanomatters

Copy link
Copy Markdown

What does this PR do?
Some SNI items advertise a menu object path without exporting the com.canonical.dbusmenu interface. Creating a GTK dbus menu for those items prevents their native context menu from being used.

Probe the mandatory dbusmenu "Version" property and only create the GTK menu after the probe succeeds. Until then, keep the existing ContextMenu fallback so startup remains non-blocking and ordinary tray actions are unchanged.

This example below is when running Windows native Steam which renders its own menu.

image

Related issues

Checklist

  • Code is formatted with clang-format
  • Builds locally (ninja -C build)
  • Man page updated for any new/changed user-facing option (man/)
  • Tested against the affected module(s)

Some SNI items advertise a menu object path without exporting the
com.canonical.dbusmenu interface. Creating a GTK dbus menu for those items
prevents their native context menu from being used.

Probe the mandatory dbusmenu "Version" property and only create the GTK
menu after the probe succeeds. Until then, keep the existing ContextMenu
fallback so startup remains non-blocking and ordinary tray actions are
unchanged.
@nanomatters
nanomatters force-pushed the fix/sni-native-context-menu branch from e47bfb0 to f3b0665 Compare August 13, 2026 11:04
@nanomatters

Copy link
Copy Markdown
Author

The clang-format is failing but it is not a file I modified.

./src/modules/backlight.cpp:127:55: error: code should be clang-formatted [-Wclang-format-violations]
backend.set_scaled_brightness(preferred_device_, static_cast(std::round(min_brightness)));

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.

1 participant