Actually, you don't need to restart X in order to get the game to run properly.
There are a few ways of doing it:
• disper, a utility to control nvidia multi-monitor setups. 'disper -s' will turn off the secondary monitor, and 'disper -e -t [left|right]' will turn on the secondary monitor again, and extend the desktop in the given direction.
• xrandr, a command-line to the RandR extension for X, which works similarly but has a more complicated interface
• If you're using TwinView, nvidia-settings and your desktop's monitor manager both provide GUI ways of manipulating the configuration of both monitors
• Metamodes, the best solution for Nvidia users. This allows you to define resolutions that use either or both of your monitors, and present themselves as normal resolutions. For example, this line in my xorg.conf file provides a wide array of resolutions that use only my primary monitor
"metamodes" "CRT: nvidia-auto-select +1920+0, DFP: nvidia-auto-select +0+0; CRT: NULL, DFP: nvidia-auto-select +0+0; CRT: 1280x1024 +1920+0, DFP: 1920x1200 +0+0; CRT: NULL, DFP: 1680x1050 +0+0; CRT: NULL, DFP: 1440x900 +0+0; CRT: NULL, DFP: 1280x720 +0+0; CRT: NULL, DFP: 960x600 +0+0; CRT: NULL, DFP: 720x480 +0+0; CRT: NULL, DFP: 640x350 +0+0; CRT: NULL, DFP: 640x480 +0+0; CRT: NULL, DFP: 800x600 +0+0; CRT: NULL, DFP: 1152x864 +0+0; CRT: NULL, DFP: 1280x1024 +0+0; CRT: NULL, DFP: 1400x1050 +0+0; CRT: NULL, DFP: 1600x1200 +0+0; CRT: NULL, DFP: 1920x1080 +0+0"
Starcraft II picks up on the availability of these resolutions, and when they are selected, the secondary monitor is simply temporarily disabled.