Commit Graph
11 Commits
Author SHA1 Message Date
ReenigneArcher bf002e200e fix(linux): reset notifications during tray tray destruction 2026-03-28 23:22:55 -04:00
ReenigneArcher 144dad5123 style: sonar fixes 2026-03-28 23:22:54 -04:00
ReenigneArcher 214ea00120 Fix tray callback issues 2026-03-28 23:22:54 -04:00
ReenigneArcher edd9008c40 Add SVG support and improve Linux tray behavior
Add SVG tray icon support and make Linux tray handling more robust:

- CMake: include icons/*.svg, link Qt Svg (Qt5/Qt6), and copy icon.svg to build dir.
- Add new icons/icon.svg asset.
- src/tray_linux.cpp: improve Wayland detection, calculate menu position with preferred position, derive screen anchor, retry popup logic, robust icon resolution (file, pixmap, themed), set application/desktop names, and fallback standard icon.
- tests/unit/test_tray.cpp: ensure test icons are copied into the test binary directory, add TestTrayIconSvgFile unit test.

These changes fix issues with blank tray icons (Qt/SNI) and unreliable menu placement on Wayland, and add SVG icon support across platforms.
2026-03-28 23:22:53 -04:00
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
ReenigneArcher e969048eec fix(linux): support themed icons 2026-03-28 23:22:52 -04:00
ReenigneArcher b409a01dec fix(linux): migrate to qt tray 2026-03-28 23:22:52 -04:00
David Lane c7f04966c0 fix(Windows): Handle thread WM_QUIT and fix message dispatch (#100) 2026-03-22 22:57:16 -04:00
David LaneandThomas Van Laere 7936cb35ae test: add screenshots (#86)
Co-authored-by: Thomas Van Laere <4990509+thomvanl@users.noreply.github.com>
2026-03-22 22:22:24 -04:00
LizardByte-botandReenigneArcher 1443a1a9da chore: update global workflows (#37)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2025-01-19 23:35:27 -05:00
ReenigneArcher cb33552612 feat: add unit testing and standardize to org (#13) 2024-05-12 08:26:01 -04:00