4

I want to prevent switching window on other desktop in this case:

  • Open app A background and app B foreground on desktop 2
  • Switch to desktop 1
  • Switch to another window of app A on desktop 1
  • Switch to desktop 2
  • There is a first window of app A foreground for some reason

How to prevent MacOS from switching to app A on all desktops after switching to just one window of the app on one desktop?

MacOS 13.2.1

3 Answers3

6

The Mission Control system setting "When switching to an application, switch to a space…" is misleading and always doesn't work as described. My best guess is that the behavior can be overridden per app, and consequently the system setting sometimes has no effect, but that's merely a guess. For example, ⌘+tabbing to Mail will switch to a desktop with an open mail viewer regardless of the global setting.

There is, however, an under-the-hood Dock preference that can be set via Terminal.

defaults write com.apple.dock workspaces-auto-swoosh -bool FALSE
killall Dock

Note that this disables the behavior entirely, which may not suit everyone. Reverse it with:

defaults write com.apple.dock workspaces-auto-swoosh -bool TRUE
killall Dock
2

The document Work in multiple spaces on Mac has this text in the section "Assign apps to spaces":

By default, when switching to an app, the desktop automatically switches to a space that has open windows for the app. For example, if you create a new TextEdit document in Desktop 3, but TextEdit windows are already open in Desktop 2, your new document opens in Desktop 2. To change this setting, choose Apple menu > System Settings, click Desktop & Dock in the sidebar, go to Mission Control on the right, then turn “When switching to an application, switch to a Space with open windows for the application” on or off.

Changing this setting might fix this behavior.

EDIT: This setting had no effect on the poster's problem. I'm leaving this answer here as it might help other users.

harrymc
  • 498,455
0

I fixed this problem by unsetting Desktop assignment to the specific Desktop. Try to set Options->Assign To->None in Dock for application A as on screenshot below.

Screenshot:
Screenshot

Dominique
  • 2,373