Repository navigation
Open on the current Space instead of jumping to another - #2
Merged
Merged
Conversation
Activating the app jumps to a Space that holds one of its windows. Since Relaunch activated before ordering the grid in, the only candidate was the text-input helper window (TUINSWindow) AppKit creates for the search field, which stays on the Space Relaunch launched on. With many Spaces, pinching opened the grid there instead of where you were. Order the grid (which joins every Space) in first, then activate.
A7med7x7
added a commit
that referenced
this pull request
Oct 22, 2026
The earlier fix (#2) ordered the grid in before activating, which only works when WindowServer has registered the grid on the current Space by the time activation picks one. Often it hadn't. AppKit's text-input helpers for the search field, TUINSWindow and SPRoundedWindow, stay on the Space where they were created, so activation jumped there instead of opening where the gesture was made. Put those helper windows on every Space before activating, so there is no other Space to switch to.
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
With several Spaces open, pinching (or the Dock icon) opened Relaunch on a different Space, usually the one it launched on, instead of the Space you were on. Later pinches then did nothing, because Relaunch was already open somewhere else.
Cause
Opening activates the app, and macOS switches to a Space that holds one of the app's windows ("When switching to an application, switch to a Space with open windows", on by default). Relaunch activated before ordering the grid in, so the only window macOS could find was
TUINSWindow, a text-input helper AppKit creates for the search field. Unlike the grid, it stays on the Space where Relaunch launched.This was introduced when activation was moved ahead of
makeKeyAndOrderFrontwhile fixing ⌥Space over other apps.Fix
Order the grid in first (it joins every Space), then activate.
Testing