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