Expand description
Window, tray, single-instance, and autostart lifecycle helpers.
Structs§
- Lifecycle
State - Quit and activation requests shared between the tray, window, and single-instance handler.
Enums§
- Close
Decision - What closing the main window does.
- Lifecycle
Error - Why a window, tray, or autostart change failed. Displays as a user-facing message.
Constants§
- MAIN_
WINDOW_ LABEL - Window label of the main app window.
- TRAY_ID
- ID of the system tray or menu bar icon.
- TRAY_
OPEN_ 🔒ID - Tray menu item that shows the main window.
- TRAY_
QUIT_ 🔒ID - Tray menu item that quits the app.
- TRAY_
SAFE_ 🔒MODE_ ID - Tray menu item that restarts without widgets.
Functions§
- activate_
or_ defer - Restores the main window, or remembers the request until the window exists.
- apply_
pending_ activation - Restores the main window if a second launch asked for it earlier.
- decide_
close - Hides to the tray only when background mode is on, the tray exists, and the user didn’t choose Quit.
- handle_
close_ request - Applies the close decision to the main window. If hiding fails, the window is shown again and an error is returned instead of leaving it invisible.
- install_
tray - Adds the tray icon with Open, Restart without widgets, and Quit items. Does nothing when the icon already exists.
- restore_
main_ window - Shows, unminimizes, and focuses the main window and restores its taskbar button.