Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #104 +/- ##
==========================================
- Coverage 73.06% 65.90% -7.17%
==========================================
Files 4 4
Lines 427 522 +95
Branches 83 152 +69
==========================================
+ Hits 312 344 +32
- Misses 72 119 +47
- Partials 43 59 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
|
5c51030 to
55d2fb6
Compare
a84acf6 to
f357f00
Compare
f357f00 to
c4b0b6e
Compare
f24fd24 to
8341803
Compare
8341803 to
aff9e33
Compare
23 tasks
9b4f8e3 to
3f1fcd4
Compare
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.
3f1fcd4 to
8e42188
Compare
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.
Revise tray context-menu positioning and activation handling. calculateMenuPosition() now prefers tray icon geometry, then a non-zero cursor position, and finally a screen-geometry heuristic to infer the panel edge (fixes Wayland/XWayland cursor (0,0) issues). The tray activation handler now responds to both Trigger and Context reasons, captures the anchor point, and defers menu->popup() via QTimer::singleShot(0) to avoid platform grab conflicts on Xorg; it also avoids reopening an already visible menu.
7ebea4e to
998ffb0
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 |
![]() |
![]() |
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