[OSX] SDL_WINDOW_FULLSCREEN grabbing bug

Hi,

It seems like using SDL_WINDOW_FULLSCREEN when creating a window on OSX, at desktop resolution, will handle grabs
different than SDL_WINDOW_FULLSCREEN_DESKTOP. When using SDL_WINDOW_FULLSCREEN I can not cmd-tab out of
the application, no matter if I grab input TRUE/FALSE, no grab call at all, relative mouse on/off.

Using SDL_WINDOW_FULLSCREEN_DESKTOP instead works like a charm, it’s then possible to cmd-tab out of the application,
even if I grab input/set relative mouse mode etc.

(Btw, this forums password security should really be looked over, clear text password feels like a slap in the face 2014) :slight_smile:

That?s just how exclusive / display-mode-switching fullscreen mode works in OS X - it?s one reason why you should prefer FULLSCREEN_DESKTOP. :)On Feb 6, 2014, at 6:09 AM, dimman wrote:

Hi,

It seems like using SDL_WINDOW_FULLSCREEN when creating a window on OSX, at desktop resolution, will handle grabs
different than SDL_WINDOW_FULLSCREEN_DESKTOP. When using SDL_WINDOW_FULLSCREEN I can not cmd-tab out of
the application, no matter if I grab input TRUE/FALSE, no grab call at all, relative mouse on/off.

Using SDL_WINDOW_FULLSCREEN_DESKTOP instead works like a charm, it’s then possible to cmd-tab out of the application,
even if I grab input/set relative mouse mode etc.

(Btw, this forums password security should really be looked over, clear text password feels like a slap in the face 2014)


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hmm okey? So working as intended? Really weird, it should really be documented somewhere imo.

Another related bug: It’s possible to cmd-tab now with SDL_WINDOW_FULLSCREEN_DESKTOP but when clicking on the icon in the dock, it appears behind the dock and menu. Wrong
z-order in other words.

Here’s a video showing the problem: http://fzwoch.project-sheol.org/ezquake_sdl2.mp4

Second question: When exiting the application, it looks like the window is exited, then some new window is spawned just to be brought down again? Anyone recognize that behaviour?

I notice similar behavior as described by dimman on my system. In short (from my filed bug report): “When using the flag SDL_WINDOW_FULLSCREEN_DESKTOP in a window – either at creation or during a key input event – if I click off on an application that is on another display monitor, my previously focused SDL window minimizes itself (without reporting any errors). I then have to find it on the dock and tell it to reshow itself.”

Is this intended behavior?

My filed bug report: https://bugzilla.libsdl.org/show_bug.cgi?id=2338

Cheers!On 2014/02/ 10, at 4:21, dimman wrote:

Hmm okey? So working as intended? Really weird, it should really be documented somewhere imo.

Another related bug: It’s possible to cmd-tab now with SDL_WINDOW_FULLSCREEN_DESKTOP but when clicking on the icon in the dock, it appears behind the dock and menu. Wrong
z-order in other words.

Here’s a video showing the problem: http://fzwoch.project-sheol.org/ezquake_sdl2.mp4

Second question: When exiting the application, it looks like the window is exited, then some new window is spawned just to be brought down again? Anyone recognize that behaviour?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Yeah, you can call SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, ?0?); to disable that behaviour.

IMO it shouldn?t minimize if the focus switches to something which is on another display, but I?m not sure whether that would be a feature change or a bug fix. :slight_smile:

Re: the weirdness when exiting the application, that should be fixed in SDL 2.0.2.On Feb 10, 2014, at 12:39 PM, Jeffrey Carpenter wrote:

I notice similar behavior as described by dimman on my system. In short (from my filed bug report): “When using the flag SDL_WINDOW_FULLSCREEN_DESKTOP in a window – either at creation or during a key input event – if I click off on an application that is on another display monitor, my previously focused SDL window minimizes itself (without reporting any errors). I then have to find it on the dock and tell it to reshow itself.”

Is this intended behavior?

My filed bug report: https://bugzilla.libsdl.org/show_bug.cgi?id=2338

Cheers!

On 2014/02/ 10, at 4:21, dimman wrote:

Hmm okey? So working as intended? Really weird, it should really be documented somewhere imo.

Another related bug: It’s possible to cmd-tab now with SDL_WINDOW_FULLSCREEN_DESKTOP but when clicking on the icon in the dock, it appears behind the dock and menu. Wrong
z-order in other words.

Here’s a video showing the problem: http://fzwoch.project-sheol.org/ezquake_sdl2.mp4

Second question: When exiting the application, it looks like the window is exited, then some new window is spawned just to be brought down again? Anyone recognize that behaviour?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sweet jesus! Thank you x1000000 :smiley: I have been putting up with this annoying “feature” for months now; this is a huge relief in terms of debugging. In regards to implementing this fix in my game framework, do you know if the interaction happens the same under the Windows platform when not enabling the hint? Unfortunately, my Windows dev box doesn’t have but one display, so I cannot test this myself.

In any case, I’ll be closing the bug report I filed. I would love to see this put in the official wiki documentation.

Cheers!

Thanks,
JeffOn 2014/02/ 10, at 11:55, Alex Szpakowski wrote:

Yeah, you can call SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, ?0?); to disable that behaviour.

IMO it shouldn?t minimize if the focus switches to something which is on another display, but I?m not sure whether that would be a feature change or a bug fix. :slight_smile:

Re: the weirdness when exiting the application, that should be fixed in SDL 2.0.2.

On Feb 10, 2014, at 12:39 PM, Jeffrey Carpenter <@Jeffrey_Carpenter> wrote:

I notice similar behavior as described by dimman on my system. In short (from my filed bug report): “When using the flag SDL_WINDOW_FULLSCREEN_DESKTOP in a window – either at creation or during a key input event – if I click off on an application that is on another display monitor, my previously focused SDL window minimizes itself (without reporting any errors). I then have to find it on the dock and tell it to reshow itself.”

Is this intended behavior?

My filed bug report: https://bugzilla.libsdl.org/show_bug.cgi?id=2338

Cheers!

On 2014/02/ 10, at 4:21, dimman wrote:

Hmm okey? So working as intended? Really weird, it should really be documented somewhere imo.

Another related bug: It’s possible to cmd-tab now with SDL_WINDOW_FULLSCREEN_DESKTOP but when clicking on the icon in the dock, it appears behind the dock and menu. Wrong
z-order in other words.

Here’s a video showing the problem: http://fzwoch.project-sheol.org/ezquake_sdl2.mp4

Second question: When exiting the application, it looks like the window is exited, then some new window is spawned just to be brought down again? Anyone recognize that behaviour?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org