Prevent OS X from changing Spaces after quitting an App?
Solution 1:
As far as I know, there's no way to do exactly what you want, but you can come pretty close. It's true that if you uncheck the "When switching..." checkbox, you don't go to the app when you click on the icon in the dock, but you do go to the app when you double click it (or just generally click it a second time when the application is active but nothing is visible).
I've been using it this way for years - I'd almost forgotten there was any other behavior.
Solution 2:
This works on 10.6.8. Just used it myself. Enjoy!
For Leopard 10.5.0–10.5.2, the solution was to access a hidden preference for Spaces by issuing the following command in a Terminal or xterm (X11) window:
defaults write com.apple.dock workspaces-auto-swoosh -bool NO
then restarting the Dock using the following command:
killall Dock
Source