Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #104 +/- ##
==========================================
- Coverage 73.06% 66.29% -6.78%
==========================================
Files 4 4
Lines 427 531 +104
Branches 83 157 +74
==========================================
+ Hits 312 352 +40
- Misses 72 120 +48
- Partials 43 59 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
|
8341803 to
aff9e33
Compare
27 tasks
998ffb0 to
c06fa40
Compare
Screenshot ComparisonPR #104 screenshots vs Matrix:
|
| Image | Baseline | PR |
|---|---|---|
tray_icon_initial.png |
||
tray_menu_checkbox_checked.png |
![]() |
|
tray_menu_checkbox_unchecked.png |
![]() |
|
tray_menu_shown.png |
![]() |
|
tray_notification_displayed.png |
![]() |
Matrix: Linux-libayatana-appindicator3-dev
| Image | Baseline | PR |
|---|---|---|
tray_icon_initial.png |
||
tray_menu_checkbox_checked.png |
![]() |
|
tray_menu_checkbox_unchecked.png |
![]() |
|
tray_menu_shown.png |
![]() |
|
tray_notification_displayed.png |
![]() |
Matrix: Windows
| Image | Baseline | PR |
|---|---|---|
tray_icon_initial.png |
||
tray_menu_checkbox_checked.png |
![]() |
![]() |
tray_menu_checkbox_unchecked.png |
![]() |
![]() |
tray_menu_shown.png |
![]() |
![]() |
tray_notification_displayed.png |
![]() |
![]() |
Matrix: macOS
| Image | Baseline | PR |
|---|---|---|
tray_icon_initial.png |
||
tray_menu_checkbox_checked.png |
![]() |
![]() |
tray_menu_checkbox_unchecked.png |
![]() |
![]() |
tray_menu_shown.png |
![]() |
![]() |
tray_notification_displayed.png |
![]() |
![]() |
Add support for simulating notification clicks and routing D-Bus notification actions to callbacks. - Export tray_simulate_notification_click() in tray.h and provide platform implementations: no-op stubs for macOS and Windows, and a working simulator for Linux. - Introduce TrayNotificationHandler (src/tray_notification_handler.h) to handle org.freedesktop.Notifications ActionInvoked signals and invoke the stored callback when the "default" action is triggered. - Integrate the handler into the Linux tray: create/connect a single handler per QApplication, store callback and notification ID before calling Notify, set up a fallback that connects QSystemTrayIcon::messageClicked when D-Bus is unavailable, and clean up/disconnect the handler on app destroy. - Also connect QSystemTrayIcon::activated to popup the context menu on left/middle clicks (fixes missing menu on left-click). - Add unit tests verifying left-click menu popup and that notification callbacks fire when simulated (tests call tray_simulate_notification_click()). These changes ensure notification clicks are handled consistently for D-Bus-dispatched notifications and add a test hook for exercising the click behavior.
Expose tray_set_log_callback in the public API and implement it on Linux to forward Qt diagnostic messages to a user-provided callback (NULL restores default behavior). Add a Qt message handler and global callback state, and route qInstallMessageHandler accordingly; provide no-op stubs on macOS and Windows since Qt logging is not used there. Improve context-menu positioning by calculating a sensible popup point from the tray icon geometry (falling back to cursor position) and use it when showing menus. Defer D-Bus ActionInvoked connection via QTimer::singleShot to avoid QSocketNotifier warnings when the tray runs in a std::thread, and add a few related include adjustments and minor activation handling cleanup.
Detect Wayland sessions and improve context-menu placement by prioritizing tray icon geometry, then using QCursor on Xorg, and falling back to a screen-geometry heuristic on Wayland (inferring panel edge from full vs available geometry). Defer showing the menu with QTimer::singleShot(0) and call QApplication::setActiveWindow before popup() so pointer grabs and XGrabPointer behavior work reliably; avoid showing the menu if it's already visible. Also avoid clearing the tray icon by only setting it when the resolved QIcon is valid, preventing spurious "No Icon set" warnings.
Replace QApplication::setActiveWindow with menu->activateWindow() to give the menu X11 focus before popup() and clarify the comment. Include QPixmap and change icon resolution logic: when the icon string refers to an existing file, load a QPixmap and add it to a QIcon immediately (avoiding QIcon's lazy loading that leaves availableSizes() empty and can produce a blank tray icon with Qt6 SNI). Fall back to QIcon::fromTheme() when the file doesn't exist. Keep guarding against setting null icons.
acf7230 to
bd83ea9
Compare
|
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.

































Description
Migrate to qt5/6 for Linux tray.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage