Mac: Fix restoring of Cmd-H-hidden fullscreen desktop windows.

This should fix http://bugzilla.libsdl.org/show_bug.cgi?id=1996
This commit is contained in:
J?rgen P. Tjern? 2013-08-12 11:09:13 -07:00
parent a84a97fe85
commit 14bf230d76
1 changed files with 5 additions and 3 deletions

View File

@ -1047,9 +1047,11 @@ Cocoa_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display
[nswindow setLevel:kCGNormalWindowLevel]; [nswindow setLevel:kCGNormalWindowLevel];
} }
if ([nswindow isVisible] || fullscreen) {
[data->listener pauseVisibleObservation]; [data->listener pauseVisibleObservation];
[nswindow makeKeyAndOrderFront:nil]; [nswindow makeKeyAndOrderFront:nil];
[data->listener resumeVisibleObservation]; [data->listener resumeVisibleObservation];
}
ScheduleContextUpdates(data); ScheduleContextUpdates(data);