Originally created by: kristofferR
On macOS, clicking the Dock icon (or choosing the app in the App Switcher) when no Carrier window is visible does nothing. This happens after the main window is closed-to-tray (hide_on_close) or otherwise hidden — the only way back to the window is the tray menu, which is non-obvious. Standard macOS behavior is that activating an already-running app reopens its main window if none is open.
Clicking the Dock icon with no visible window should re-show (or recreate) the main Carrier window and bring it to the front. Reference: IPTVchecker does exactly this.
src-tauri/src/lib.rs handles RunEvent::Ready and RunEvent::ExitRequested in the run loop (~lib.rs:1855), but there is no RunEvent::Reopen handler. On macOS, Tauri emits RunEvent::Reopen { has_visible_windows, .. } when the Dock icon is clicked; without handling it, the click is a no-op.
The close path (install_main_close_handler, lib.rs:1116) hides the main window to the tray rather than destroying it, so the typical fix is: on Reopen with !has_visible_windows, show() + set_focus() the existing main window (recreate it if it's genuinely gone, e.g. after a theme switch).
Originally posted by: kristofferR
Merged PR [#39] to main in 317a629. The macOS Dock reopen behavior is covered with regression tests for hidden/no-window and settings-only activation cases, so closing this as resolved.
Related
Tickets:
#39Ticket changed by: kristofferR