strawberry/app
trvon c3dc258d5a
Some checks failed
Build and Test / build (debug, clang) (push) Has been cancelled
Build and Test / build (debug, gcc) (push) Has been cancelled
Build and Test / build (release, clang) (push) Has been cancelled
Build and Test / build (release, gcc) (push) Has been cancelled
Build and Test / macos (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
App: tray icon survives the sway/waybar startup race
strawberry-tray did a one-shot QSystemTrayIcon::isSystemTrayAvailable() check at
startup and, if no StatusNotifier host was up yet, permanently fell back to
window-only mode (never creating the tray icon). Under sway the app is usually
`exec`ed before waybar registers its tray module, so the indicator never showed
even after waybar came up.

- main.cpp no longer disables the tray on that one-shot check; it keeps the tray
  and logs a hint.
- AppController::start(): if the tray host isn't available yet, retry every 1.5 s;
  when it appears, hide()+show() the icon to (re)register with the host. Only if
  no host shows up within ~15 s does it fall back to opening the window.

Verified live on sway: with waybar up, the fixed binary registers a
StatusNotifierItem (icon visible); the retry covers the start-before-waybar case.
Suite 51/51; clang static analyzer clean on the changed app TUs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-28 19:15:12 -06:00
..
tests Read the autostart test file without istreambuf_iterator 2026-10-25 21:00:19 -06:00
app_controller.cpp App: tray icon survives the sway/waybar startup race 2026-10-28 19:15:12 -06:00
app_controller.hpp Add "Start at login" to the tray app 2026-10-25 20:59:52 -06:00
autostart.cpp Add "Start at login" to the tray app 2026-10-25 20:59:52 -06:00
autostart.hpp Add "Start at login" to the tray app 2026-10-25 20:59:52 -06:00
daemon_client.cpp Replace web UI with a Qt tray app 2026-10-25 18:17:03 -06:00
daemon_client.hpp Replace web UI with a Qt tray app 2026-10-25 18:17:03 -06:00
main.cpp App: tray icon survives the sway/waybar startup race 2026-10-28 19:15:12 -06:00
main_window.cpp Use macOS store paths and launchd hints in the CLI, app and MCP 2026-10-28 04:39:57 -06:00
main_window.hpp Add "Start at login" to the tray app 2026-10-25 20:59:52 -06:00
main_window_policy.cpp Replace web UI with a Qt tray app 2026-10-25 18:17:03 -06:00
meson.build Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
notifier.cpp Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
notifier.hpp Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
notifier_tray.cpp Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
tray.cpp Add "Start at login" to the tray app 2026-10-25 20:59:52 -06:00
tray.hpp Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
tray_state.cpp Replace web UI with a Qt tray app 2026-10-25 18:17:03 -06:00
tray_state.hpp Replace web UI with a Qt tray app 2026-10-25 18:17:03 -06:00