Add native StatusNotifier tray support on Linux using dbus - #1467
Open
IdelsTak wants to merge 142 commits into
Open
Add native StatusNotifier tray support on Linux using dbus#1467IdelsTak wants to merge 142 commits into
IdelsTak wants to merge 142 commits into
Conversation
Initial ivy support (squashed)
Deprecated Monocle, add support for Headless
# Conflicts: # build.xml
8 tasks
This reverts commit 2747215.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
QZ Tray can now use the desktop panel tray when a supported
StatusNotifierhost is available. But, it also keeps the existing taskbar window as a safe fallbackThe new tray recreates the existing menu structure from
TrayManager, including Advanced and Diagnostic submenus, checkbox items, separators, reload, About, autostart, and ExitThe Linux StatusNotifier path now also sends native desktop notifications through
org.freedesktop.Notifications, so the SNI tray path no longer loses messages that previously went through AWTTrayIcon.displayMessage(...)Changes
org.kdeandorg.freedesktopStatusNotifier namespacescom.canonical.dbusmenuimplementation for the existing QZ Tray menuTrayManageron the Swing event threadItemsPropertiesUpdatedTrayManager.displayMessage(...)calls to the SNI tray when AWT tray is not activetray.notificationsinfo-message suppression rule unchangedQZ Trayas the app name and one-word native summaries:Update,Attention, andProblemfile://URI for notification icons after XFCE, Budgie, KDE, and LXQt icon testingorg.freedesktop.Notificationsmay be activatable but not already ownedCrucial StatusNotifier property fix
I made the StatusNotifier properties to now use an explicit
org.freedesktop.DBus.PropertiesimplementationThis was needed because annotation-bound property getters returned raw values for
Properties.Getinstead of the required D-Bus variantsSome hosts tolerated those replies, while LXQt could not decode
IconName,IconThemePath, orMenuReturning proper variants fixed both the fallback gear icon and the missing tray menu on LXQt
And this protocol fix also allowed COSMIC to load the QZ icon and menu!
Native Linux notifications
The SNI path now sends desktop notifications directly over D-Bus using
org.freedesktop.Notifications.NotifyThis reuses the existing tray message flow instead of changing each notification call site
The notification payload is intentionally small:
appName:QZ TrayappIcon: generated PNGfile://URIsummary: one-word level labelbody: existing message texturgency: mapped fromTrayIcon.MessageTypeexpireTimeout: desktop defaultThe Java D-Bus method is named
sendNotification(...)and mapped toNotifywith@DBusMemberName("Notify")to avoid colliding withObject.notify()If the notification service is missing or cannot be activated, QZ logs a low-noise warning and keeps the tray/menu path running
Smoke tests and manual DEs verifications
file://URIOnly desktops that passed the full QZ Tray flow are enabled in the production allowlist
COSMIC remains outside the allowlist until the nested Diagnostic submenu works
Notification icon findings
The notification icon path is separate from the SNI tray icon path
Notification daemons do not receive or resolve the StatusNotifier
IconThemePath, soqz-tray-symboliccan show a missing-icon placeholderSVG path and SVG
file://URI worked on some desktops, but KDE and LXQt did not handle notification SVG theming consistently enough for this PRBudgie rendered placeholders with a bare PNG path but worked with the PNG
file://URIFor this branch, notification icons use the generated PNG
file://URI, while the SNI tray can still use symbolic SVGs except for Cinnamon and LXQtFallback behavior
QZ Tray keeps using the taskbar fallback when any of these conditions apply
Unverified desktops can be tested with
-Dqz.sni.allowUnverifiedDesktop=truewithout changing the production allowlistTesting
gdbus,busctl, anddbus-monitortest/manual/linux-notifications-smoke.shtest/manual/linux-notification-icon-smoke.shqz.Appruntime notification smoke withtest/manual/qz-app-runtime-smoke.shtest/manual/qz-app-menu-smoke.shTL;DR
TrayManagerbehavior is reused instead of duplicating application actions inside the D-Bus layerfile://URIMenuis exported before watcher registration because some hosts inspect the item immediately