Skip to content

Show Preferences when Amethyst is reopened, not whenever it becomes active - #1918

Merged
ianyh merged 1 commit into
ianyh:developmentfrom
djp3:show-preferences-on-reopen
Nov 14, 2026
Merged

ianyh merged 1 commit into
ianyh:developmentfrom
djp3:show-preferences-on-reopen

Conversation

@djp3

@djp3 djp3 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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.applicationDidBecomeActive shows 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, returning false since the reopen has been handled. applicationDidBecomeActive and the isFirstLaunch flag it needed are gone.

Opening Amethyst again from the Finder or Spotlight behaves as before; "Check for Updates…" shows only Sparkle's panel.

…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 ianyh left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so annoying so thank you for fixing it.

@ianyh
ianyh merged commit a209b3e into ianyh:development Nov 14, 2026
1 check passed
@djp3
djp3 deleted the show-preferences-on-reopen branch November 14, 2026 01:54
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.
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