You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug report was migrated from our old Bugzilla tracker.
Reported in version: HG 2.0 Reported for operating system, platform: Mac OS X 10.8, x86_64
Comments on the original bug report:
On 2013-07-28 18:22:27 +0000, Alex Szpakowski wrote:
In OS X, if an SDL window is in SDL_WINDOW_FULLSCREEN_DESKTOP mode and SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS is set to "0", the window's visibility state seems to get messed up if the user hides the program with command-H.
Hiding the program while the window is in fullscreen-desktop mode sets the window to windowed mode (calling the implementation's SetWindowFullscreen function), and un-hiding it is supposed to restore the window back to fullscreen-desktop mode.
Because the visibility state gets messed up, the window restoration process will not happen properly when the user un-hides the program, and the SDL window will be left in borderless windowed mode at its original windowed resolution, rather than in fullscreen desktop mode with the desktop's resolution.
This only seems to happen when SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS is disabled because window minimization and un-minimization apparently takes care of the bad state.
The offending code appears to be these 3 lines: http://hg.libsdl.org/SDL/file/399ff49069a5/src/video/cocoa/SDL_cocoawindow.m#l1035
[nswindow makeKeyAndOrderFront:nil] is called when the program has just become hidden, and combined with the pauseVisibleObservation/resumeVisibleObservation calls it seems to mess with the window's visibility state.
I worked around the issue by only executing the above 3 lines if if [nswindow isVisible] returns YES. It fixes the problem for me, but I'm not sure if it's the best way or if there are other implications to consider.
On 2013-07-28 20:11:19 +0000, Sam Lantinga wrote:
Hey Jorgen, can you take a quick look at this and see if that's a good fix?
Thanks!
On 2013-08-12 14:12:28 +0000, (disabled) Jørgen Tjernø wrote:
This bug report was migrated from our old Bugzilla tracker.
Reported in version: HG 2.0
Reported for operating system, platform: Mac OS X 10.8, x86_64
Comments on the original bug report:
On 2013-07-28 18:22:27 +0000, Alex Szpakowski wrote:
On 2013-07-28 20:11:19 +0000, Sam Lantinga wrote:
On 2013-08-12 14:12:28 +0000, (disabled) Jørgen Tjernø wrote:
The text was updated successfully, but these errors were encountered: