Skip to content

Fix closing Settings window quitting the app on macOS Tahoe#65

Open
davidnichols-ops wants to merge 1 commit into
gouwsxander:mainfrom
davidnichols-ops:fix/settings-window-quit
Open

Fix closing Settings window quitting the app on macOS Tahoe#65
davidnichols-ops wants to merge 1 commit into
gouwsxander:mainfrom
davidnichols-ops:fix/settings-window-quit

Conversation

@davidnichols-ops

Copy link
Copy Markdown

Problem

When using Reef on macOS Tahoe (26), closing the Settings window quits the entire application instead of just closing the window. The menu bar icon disappears and Reef stops running. (Issue #62)

Root Cause

Reef uses .accessory activation policy (line 69 of ReefApp.swift) for its MenuBarExtra, but the AppDelegate does not implement applicationShouldTerminateAfterLastWindowClosed. By default, macOS terminates accessory-policy apps when their last window closes. Since the Settings window is the only regular window, closing it causes the app to exit.

Fix

Added applicationShouldTerminateAfterLastWindowClosed returning false to AppDelegate. This ensures the app continues running in the menu bar after the Settings window is closed, which is the expected behavior for a menu bar utility.

Testing

  • Launch Reef → Settings window appears, menu bar icon is visible
  • Close the Settings window → menu bar icon remains, Reef stays running
  • Reopen Settings from the menu bar → works as expected

Reef uses .accessory activation policy for its menu bar extra, but
does not override applicationShouldTerminateAfterLastWindowClosed.
On macOS Tahoe (26), closing the Settings window terminates the
entire app instead of keeping it running in the menu bar.

Add applicationShouldTerminateAfterLastWindowClosed returning false
so the app stays alive when the Settings window is closed.

Fixes gouwsxander#62
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