Skip to content

Open on the current Space instead of jumping to another - #2

Merged
A7med7x7 merged 1 commit into
mainfrom
fix/open-on-current-space
Oct 14, 2026
Merged

A7med7x7 merged 1 commit into
mainfrom
fix/open-on-current-space

Conversation

@A7med7x7

Copy link
Copy Markdown
Member

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 makeKeyAndOrderFront while fixing ⌥Space over other apps.

Fix

Order the grid in first (it joins every Space), then activate.

Testing

  • Reproduced before the fix: launched on Space 214, moved to Space 161, opened Relaunch, and macOS jumped back to 214.
  • After the fix, pinching across many Spaces, most of them full-screen apps: 11 opens, all on the current Space. One opened and closed straight away (the window lost key immediately). It hasn't happened again, but it's worth watching.

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
A7med7x7 merged commit 37d3ab4 into main Oct 14, 2026
1 check passed
@A7med7x7
A7med7x7 deleted the fix/open-on-current-space branch October 14, 2026 08:33
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.
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