If you're just talking about stretching between both monitors, you can expose the correct resolutions manually in xorg.conf so that it sticks to one monitor only rather than manually turning it on and off. My line in [Screen], for example, reads
Option "metamodes" "CRT: 1440x900 +1680+0, DFP: 1680x1050 +0+0; CRT: NULL, DFP: 1680x1050 +0+0; CRT: NULL, DFP: 1400x1050 +0+0; CRT: NULL, DFP: 1280x1024 +0+0; CRT: NULL, DFP: 1280x960 +0+0; CRT: NULL, DFP: 1152x864 +0+0; CRT: NULL, DFP: 1024x768 +0+0; CRT: NULL, DFP: 960x720 +0+0; CRT: NULL, DFP: 928x696 +0+0; CRT: NULL, DFP: 896x672 +0+0; CRT: NULL, DFP: 832x624 +0+0; CRT: NULL, DFP: 800x600 +0+0; CRT: NULL, DFP: 720x400 +0+0; CRT: NULL, DFP: 700x525 +0+0; CRT: NULL, DFP: 640x512 +0+0; CRT: NULL, DFP: 640x480 +0+0; CRT: NULL, DFP: 640x400 +0+0; CRT: NULL, DFP: 640x350 +0+0; CRT: NULL, DFP: 576x432 +0+0; CRT: NULL, DFP: 512x384 +0+0; CRT: NULL, DFP: 416x312 +0+0; CRT: NULL, DFP: 400x300 +0+0; CRT: NULL, DFP: 360x200 +0+0; CRT: NULL, DFP: 320x240 +0+0; CRT: NULL, DFP: 320x200 +0+0; CRT: NULL, DFP: 320x175 +0+0"
Which in effect exposes resolutions to the game I'm running that are one of the standards for the first monitor, and "off" for the other. They simply show as normal resolutions in the game, and the system automatically blanks the second screen when needed and turns it back on when you're done. It does mean that you can't really use the second screen while you're gaming, but it's a much more elegant solution that manually turning TwinView on and off in my opinion.