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:

How do you turn it off in System Settings?

  1. Open System Settings > Desktop & Dock.
  2. Scroll to Mission Control.
  3. 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:

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

Written by Dan Bayer, developer of Spacepal. Last updated 2026-10-27.