Skip to content

fix: prevent macOS shutdown blocking when tray icon is active#68

Open
DesmondSylin wants to merge 1 commit into
dragonwocky:mainfrom
DesmondSylin:claude/fix-macos-shutdown-tray-011CV32g3tWYnugh8fe54XxT
Open

fix: prevent macOS shutdown blocking when tray icon is active#68
DesmondSylin wants to merge 1 commit into
dragonwocky:mainfrom
DesmondSylin:claude/fix-macos-shutdown-tray-011CV32g3tWYnugh8fe54XxT

Conversation

@DesmondSylin

Copy link
Copy Markdown

Added proper handling of app quit events to prevent blocking system shutdown on macOS. When the system initiates shutdown, the app now correctly allows windows to close instead of intercepting the close event and hiding them to the tray.

Changes:

  • Added isQuitting flag to track app quit state
  • Modified onWindowClose to allow closing during quit
  • Modified onWindowUnload to skip interception during quit
  • Added before-quit event listener to set flag and cleanup

This fix ensures that when users shut down their Mac, Obsidian will properly exit even when running in background with tray icon, resolving the issue where shutdown would hang waiting for the app.

Added proper handling of app quit events to prevent blocking system
shutdown on macOS. When the system initiates shutdown, the app now
correctly allows windows to close instead of intercepting the close
event and hiding them to the tray.

Changes:
- Added isQuitting flag to track app quit state
- Modified onWindowClose to allow closing during quit
- Modified onWindowUnload to skip interception during quit
- Added before-quit event listener to set flag and cleanup

This fix ensures that when users shut down their Mac, Obsidian
will properly exit even when running in background with tray icon,
resolving the issue where shutdown would hang waiting for the app.
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.

2 participants