Repository navigation
Show Preferences when Amethyst is reopened, not whenever it becomes active - #1918
Merged
Merged
Conversation
…ctive Preferences opened on every activation of the app after the first, so any window Amethyst brought to the front, such as Sparkle's "Checking for updates" panel, opened Preferences as well. Opening the app again from the Finder, Spotlight or `open` is a reopen event, so Preferences is now shown from that and from nothing else.
ianyh
approved these changes
Nov 14, 2026
ianyh
left a comment
Owner
There was a problem hiding this comment.
This is so annoying so thank you for fixing it.
djp3
added a commit
to djp3/Amethyst
that referenced
this pull request
Nov 24, 2026
The fork's builds include all of Ian's 0.25.1, so the notice says so and drops the four entries 0.25.1 already ships (ianyh#1890, ianyh#1911, ianyh#1918, ianyh#1919); ianyh#1894 and ianyh#1913 are marked as merged after 0.25.1. Window animation works without Screen Recording, which only makes it smoother on macOS 14 or later. The Accessibility path, the Shortcuts tab and the Tall section no longer point at the removed shortcut table. The layout list gains 4Column-Left, 4Column-Right and Widescreen-Tall-Right, and the build section notes that the fastlane lane exports with Ian's team.
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.
The problem
Choose "Check for Updates…" from the status menu and the Preferences window opens alongside Sparkle's "Checking for updates…" panel. Kind of annoying because the preference panel blocks visibility of Sparkle.
AppDelegate.applicationDidBecomeActiveshows Preferences on every activation of the app after the first. That dates from 2017, when the intent was that "opening" Amethyst again (it has no Dock icon and no main window) should show something. But activation is a much broader signal than "the user opened the app": any window Amethyst brings to the front activates it, and Sparkle's update panels do exactly that.The fix
macOS has a hook for this case:
applicationShouldHandleReopen(_:hasVisibleWindows:)fires when the user launches an already-running app (Finder double-click, Spotlight,open -a Amethyst), and not when the app merely activates to show one of its own windows. Preferences is now shown from that hook, returningfalsesince the reopen has been handled.applicationDidBecomeActiveand theisFirstLaunchflag it needed are gone.Opening Amethyst again from the Finder or Spotlight behaves as before; "Check for Updates…" shows only Sparkle's panel.