Skip to content

fix: improve DBusMenu compatibility on XFCE - #222

Merged
pitill0 merged 1 commit into
mainfrom
fix/xfce-dbusmenu
Sep 4, 2026
Merged

pitill0 merged 1 commit into
mainfrom
fix/xfce-dbusmenu

Conversation

@pitill0

@pitill0 pitill0 commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Summary

Improve the Linux StatusNotifierItem DBusMenu implementation so tray context menus are correctly exposed on XFCE.

XFCE does not invoke the StatusNotifierItem ContextMenu method for a normal right click. Instead, its StatusNotifier plugin builds a local menu from the exported com.canonical.dbusmenu object. The previous implementation exposed only a subset of that interface, causing XFCE to consider the menu unusable and fall back to the panel context menu.

Changes

  • Expand the DBusMenu interface with:

    • GetGroupProperties
    • GetProperty
    • EventGroup
    • AboutToShowGroup
    • ItemsPropertiesUpdated
    • LayoutUpdated
    • ItemActivationRequested
  • Return False from AboutToShow when the static layout does not require an update.

  • Add property filtering and shared menu event dispatching.

  • Extend tray tests to cover the DBusMenu contract.

  • Fix the Web JavaScript metadata test so it explicitly injects navigatorRef under Node.js.

  • Check the browser entrypoint as an ES module in the local gate.

  • Make the development environment reproducible by including Bandit in the dev dependencies and using .[dev] from requirements-dev.txt.

Validation

Tested on XFCE 4.18.4 under Xorg.

Before the change:

  • left click correctly activated FluxTuner
  • middle click generated SecondaryActivate
  • right click opened the XFCE panel context menu
  • XFCE detected Menu=/MenuBar, but did not build a usable application menu

After the change:

  • left click continues to activate FluxTuner
  • right click correctly opens the FluxTuner context menu
  • full make gate passes cleanly

Note: XFCE may require a panel reload (xfce4-panel -r) to refresh a newly registered tray icon in some sessions. This appears to be separate from the DBusMenu compatibility issue addressed here.

@pitill0
pitill0 merged commit 597635c into main Sep 4, 2026
6 checks passed
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