QuartzRandRSetMode(pScreen, &wsLastUsedMode, TRUE);
This has worked fine for a long time.. on 10.5, 10.6 and 10.7... but on 10.8 its a different story. Cmd+Opt+A out of captured fullscreen works ok, but going back in... if its not having to change resolutions (like 1280x800 desktop and 1280x800 fullscreen) it occasionally works... but if the fullscreen was any lower res, the X server always crashes...
That was a test build Wineskin wrapper of course running a game in Wine and crashed trying to do the changed Cmd+Opt+A back into fullscreen. its xorg-server 1.12.99.905 as you can see in the log, but I've tested with multiple 1.12 versions and some earlier, and it happens in 10.8 on all of them. This build runs fine on 10.6 for me.
as a test, I opened an xterm and used xrandr to change back, but it crashes too... so I don't think my code change is causing the crash specifically. Now if I launch a normal XQuartz 2.7.2, and Cmd+Opt+A out and use xrandr to get back to fullscreen it doesn't crash though... so I'm a bit at a loss of why its happening, as I don't have any changes to the code for resolution switching other than this one thing... I used to, but now that RandR and screen capturing is working good in XQuartz, I took all my code out that did that stuff.
Any thoughts anyone has would be appreciated, and I really think this would be a useful feature to add to XQuartz anyways, so people can toggle out and back in to the captured fullscreen for multitasking without having to use in game options to adjust resolutions or launch xterm to use xrandr.