[SDL] About focusing out of a fullscreen game (alt-tab or minimize)
havoc at ghdigital.com
Fri Jan 20 02:22:30 PST 2012
My own experience suggests the desired behavior in 99% of cases on Linux is the following:
1. do not resize the desktop in any way (on Linux this tends to kill secondary monitors, and shuffle icons and windows around to fit the small space, both are very annoying).
2. open a maximized window and request the window manager to make it borderless (there's an Atom to negotiate for this).
3. grab mouse only, do not grab keyboard.
This works well for me in my native (non-SDL) GLX game engine port, the SDL version has the undesirable behaviors being discussed here.
This issue in SDL is the single reason I do not play fullscreen SDL games on Linux, I always switch them to a windowed mode (to get back my secondary monitors, and to not mess up my desktop layout)
and I also do not play any SDL games that do not have an easy way to release the input grab (which disables alt-tab, alt-f4, my volume control keys, my mute key, my previous/next music track keys and
other such features of my keyboard).
I would go as far as saying there is no valid excuse for this behavior.
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier
More information about the SDL