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 7636d5167d0818b3
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
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Mon Aug 12 08:45:37 2013 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Mon Aug 12 11:09:13 2013 -0700
     1.3 @@ -1047,9 +1047,11 @@
     1.4          [nswindow setLevel:kCGNormalWindowLevel];
     1.5      }
     1.6  
     1.7 -    [data->listener pauseVisibleObservation];
     1.8 -    [nswindow makeKeyAndOrderFront:nil];
     1.9 -    [data->listener resumeVisibleObservation];
    1.10 +    if ([nswindow isVisible] || fullscreen) {
    1.11 +        [data->listener pauseVisibleObservation];
    1.12 +        [nswindow makeKeyAndOrderFront:nil];
    1.13 +        [data->listener resumeVisibleObservation];
    1.14 +    }
    1.15  
    1.16      ScheduleContextUpdates(data);
    1.17