Skip to content

Conversation

@392781
Copy link

@392781 392781 commented Dec 17, 2025

Attempting to add support to minimize the app to the menu tray in order to address #671. The current implementation for MacOS has the app "hide" in the Dock upon close. For a persistent application such as this, it should simply stay minimized in the tray with the actual settings UI closed out.

This can be implemented via LSUIElement but may require additional changes to how the application handles window starting, closing, and quitting.

@392781 392781 marked this pull request as draft December 17, 2025 00:18
392781 and others added 3 commits December 23, 2025 11:17
… control

- Hide dock icon immediately on startup using setHideInDock(true)
- Start with window hidden and no main window attached to application lifetime
- Window will only appear when user clicks the tray icon
- Removed automatic window activation on app becoming active
- Ensures proper menu bar-only behavior with LSUIElement=true
…enu bar app

- OnClosing: Respect MinimizeToTray setting on macOS
  * When enabled: minimize to tray instead of closing the window
  * When disabled: allow app to quit normally
  * Always minimize to tray on system shutdown

- BringToFront: Complete window restoration for menu bar app
  * Show dock icon before displaying window
  * Set window to normal state and make visible
  * Re-apply theme/blur effects after showing (fixes blur persistence issue)
  * Activate and focus the window

- BringToTray: Hide window without using dock minimize
  * Hide visibility and taskbar first
  * Hide dock icon via setHideInDock(true)
  * Detach main window from application lifetime
  * Prevents unwanted dock icon appearance on Linux/other platforms

- Handles both initial launch and subsequent visibility toggles
- Properly restores blur/transparency effects on window reopen
@392781 392781 marked this pull request as ready for review December 26, 2025 02:17
@392781
Copy link
Author

392781 commented Dec 26, 2025

@timschneeb Let me know what you think of this and if I need to implement any other things. Additionally, I noticed that the current version of the manager is set as "5.1.1.0" despite the latest release being "5.1.2.0". Might be a good opportunity to update that with either this or additional pull requests.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant