src/video/cocoa/SDL_cocoawindow.m
changeset 7469 4310d5aee6fe
parent 7389 361d1a0c90f6
child 7507 885b4aab4190
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Mon Jul 15 20:30:04 2013 -0400
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Tue Jul 16 01:02:51 2013 -0700
     1.3 @@ -866,8 +866,12 @@
     1.4      SDL_WindowData *windowData = ((SDL_WindowData *) window->driverdata);
     1.5      NSWindow *nswindow = windowData->nswindow;
     1.6  
     1.7 +    // makeKeyAndOrderFront: has the side-effect of deminiaturizing and showing
     1.8 +    // a minimized or hidden window, so check for that before showing it.
     1.9      [windowData->listener pauseVisibleObservation];
    1.10 -    [nswindow makeKeyAndOrderFront:nil];
    1.11 +    if (![nswindow isMiniaturized] && [nswindow isVisible]) {
    1.12 +        [nswindow makeKeyAndOrderFront:nil];
    1.13 +    }
    1.14      [windowData->listener resumeVisibleObservation];
    1.15  
    1.16      [pool release];