Mac: Fix restoring of Cmd-H-hidden fullscreen desktop windows.
authorJørgen P. Tjernø <jorgen@valvesoftware.com>
Mon, 12 Aug 2013 11:09:13 -0700
changeset 7636 d5167d0818b3
parent 7635 c57071e3d636
child 7637 13522dc3e9da
Mac: Fix restoring of Cmd-H-hidden fullscreen desktop windows. This should fix http://bugzilla.libsdl.org/show_bug.cgi?id=1996
src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Mon Aug 12 08:45:37 2013 -0700
+++ b/src/video/cocoa/SDL_cocoawindow.m	Mon Aug 12 11:09:13 2013 -0700
@@ -1047,9 +1047,11 @@
         [nswindow setLevel:kCGNormalWindowLevel];
     }
 
-    [data->listener pauseVisibleObservation];
-    [nswindow makeKeyAndOrderFront:nil];
-    [data->listener resumeVisibleObservation];
+    if ([nswindow isVisible] || fullscreen) {
+        [data->listener pauseVisibleObservation];
+        [nswindow makeKeyAndOrderFront:nil];
+        [data->listener resumeVisibleObservation];
+    }
 
     ScheduleContextUpdates(data);