Fix closing Settings window quitting the app on macOS Tahoe#65
Open
davidnichols-ops wants to merge 1 commit into
Open
Fix closing Settings window quitting the app on macOS Tahoe#65davidnichols-ops wants to merge 1 commit into
davidnichols-ops wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.accessoryactivation policy (line 69 ofReefApp.swift) for itsMenuBarExtra, but theAppDelegatedoes not implementapplicationShouldTerminateAfterLastWindowClosed. 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
applicationShouldTerminateAfterLastWindowClosedreturningfalsetoAppDelegate. 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