Files
tray/tests
ReenigneArcher 39992ed86e Simulate notification clicks and D-Bus handler
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.
2026-03-28 23:22:53 -04:00
..
2026-03-22 22:22:24 -04:00
2026-03-22 22:22:24 -04:00
2026-03-22 22:22:24 -04:00
2025-01-19 23:35:27 -05:00
2025-01-19 23:35:27 -05:00