#2 is only a clarification, it describes the current behavior.
X11 allows a window to be created that is managed by the window manager (this is the normal kind) and that can then negotiate for an Atom asking for fullscreen (borderless, covers panel, etc).
X11 also allows a window to be created that is NOT managed by the window manager, this kind is borderless by nature (without the window manager to add decorative window rects around it for
interactivity), and CAN NOT receive keyboard or mouse events unless it grabs these input sources intentionally, which overrides the window manager shortcuts.
As far as I understand it, SDL currently uses the managed type, and this is what I am saying we should stick to.
I was only clarifying that the unmanaged type requires keyboard grab, and the use of keyboard grab in SDL may be a hold-over from past code that used an unmanaged window.
Back to the theory of what users want however:
In general, users don’t like SDL doing keyboard grab, it is reserved for screensavers and screen locking, it was never meant to be used for common usage.
My point is that we should not resize the desktop (mode switching), we should use a managed window, and we should not grab keyboard (thus allowing window manager shortcuts to continue functioning).
The all-or-nothing nature of the keyboard shortcut handling is potentially problematic for some apps, but that is another topic entirely, from a user perspective it is less annoying to contend with
shortcut conflicts (such as alt-F keys) than it is to lose volume control, alt-tab and other conveniences that any NORMAL app would not interfere with.
If one wishes to write screen locking software with SDL, then we need to provide the keyboard grab functionality, but I do not think it should be used in any normal situation.On 01/26/2012 04:13 AM, Sylvain Brunerie wrote:
2012/1/20 Forest Hale <@Forest_Hale mailto:Forest_Hale>
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.
A maximized borderless window will still have panels (in any) under/over it, won’t it?
I agree with points 1 and 3, as I hate having my resolution changed and my desktop icons messed up when a game doesn’t quit correctly, and as I don’t see what could be prohibitive with not grabbing
the keyboard (this would allow Alt-F4 to close the window, Alt-F1 to open the Gnome Applications menu, but why not?). Not being able to change volume when in a fullscreen game may be, when I think of
it, the first issue preventing me to play games under Linux.
–
LordHavoc
Author of DarkPlaces Quake1 engine - LadyHavoc's DarkPlaces Quake Modification
Co-designer of Nexuiz - Nexuiz Classic – Alientrap
“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