Stop your Mac jumping to another desktop when you click an app
Your Mac jumps desktops because of a setting called When switching to an application, switch to a Space with open windows for the application, in System Settings > Desktop & Dock > Mission Control. Turning it off stops most jumps when you switch apps with ⌘Tab. It doesn't cover every case: Dock clicks, links opening in another app, and apps assigned to a desktop can still take you elsewhere. Spacepal's Space Lock catches what's left.
Why does macOS switch desktops on its own?
When you switch to an app, macOS wants to show you one of its windows. If all of that app's windows are on another desktop, the default is to slide you over to them. The usual triggers:
- ⌘Tab to an app whose windows are on another desktop.
- Clicking the app's icon in the Dock.
- Clicking a link or notification that opens an app with windows elsewhere (for example a link that opens in a browser window on Desktop 3).
- An app set to Options > Assign To > a specific desktop in the Dock.
How do you turn it off in System Settings?
- Open System Settings > Desktop & Dock.
- Scroll to Mission Control.
- Turn off When switching to an application, switch to a Space with open windows for the application.
Apple describes the setting in Change Desktop & Dock settings. With it off, switching to an app keeps you on the current desktop. If the app has no window here, it becomes active with no window in front, and you can press ⌘N to open a new one on this desktop.
Is there a Terminal setting for it?
There's an older hidden Dock preference that people use for the same purpose:
defaults write com.apple.dock workspaces-auto-swoosh -bool false
killall Dock
It's not documented by Apple, and how it behaves has changed between macOS versions. Some people report it also changes how ⌘Tab feels. To undo it, run defaults delete com.apple.dock workspaces-auto-swoosh and then killall Dock. Try the System Settings switch first.
Why does it still jump sometimes?
Turning the setting off doesn't stop every switch:
- Dock clicks. Clicking a running app's Dock icon can still take you to its windows on another desktop.
- Assigned apps. An app assigned to a desktop (Dock > Options > Assign To) will open there. Set it back to None if you don't want that.
- Reordering. If Automatically rearrange Spaces based on most recent use is on, desktops reorder themselves after a switch, so it looks like you landed somewhere new. Turn it off as well.
How does Spacepal keep you on the current Space?
Space Lock (Settings, Windows, off by default). If an app activation pulls you to another Space on the same display, through ⌘Tab, a Dock click or a link, Spacepal takes you back right away and brings that app's window to the Space you were on. Switches you make with Spacepal's own shortcuts are ignored.
Stay on this Space when clicking Dock icons (Settings, General, off by default, marked experimental). When an app's windows are on another Space, a Dock click brings you back and opens a new window of the app here.
Open an app here (⌃⌥L). A small launcher that opens an app on the current Space.
Find a window and bring it here (⌃⌥F, then ⌘Return). Search windows on every Space and pull one over.
All of these need Accessibility permission (see Setup). The shortcuts are listed in Keyboard shortcuts.
Related guides
Summary
- Turn off "When switching to an application, switch to a Space with open windows for the application" in System Settings > Desktop & Dock > Mission Control.
- The hidden
workspaces-auto-swooshDock key does something similar but isn't documented. Use it with care. - Dock clicks and apps assigned to a desktop can still switch you. Check Dock > Options > Assign To.
- Spacepal's Space Lock sends you back and brings the app's window to you instead.
Written by Dan Bayer, developer of Spacepal. Last updated 2026-10-27.