How do I disable auto swoosh (automatic space switching) in MacOS Sierra?

Solution 1:

I have macOS Sierra 10.12.6, and this option is in Mission Control settings (also looks like it's in the same place on my old Mac running 10.7.5). Simply uncheck the option "When switching to an application, switch to a Space with open windows for the application", and Cmd-Tab will no longer make you switch Spaces.

Clicking on an app icon in the Dock will also no longer switch spaces, unless the app is already selected (its name is in the menubar), in which case further clicks on the icon will cycle you through any Spaces with a window open for that app. Not 100% what you are asking for, but if the app is already selected you should have no reason to click the icon again anyway.