Kaynağa Gözat

Mac: Don't give windows focus back when we're closing them.

Fixes bug #1840 (https://bugzilla.libsdl.org/show_bug.cgi?id=1840)
J?rgen P. Tjern? 11 yıl önce
ebeveyn
işleme
bc92383eea
1 değiştirilmiş dosya ile 7 ekleme ve 2 silme
  1. 7 2
      src/video/cocoa/SDL_cocoawindow.m

+ 7 - 2
src/video/cocoa/SDL_cocoawindow.m

@@ -299,9 +299,14 @@ SetWindowStyle(SDL_Window * window, unsigned int style)
        !!! FIXME:   http://bugzilla.libsdl.org/show_bug.cgi?id=1825
     */
     windows = [NSApp orderedWindows];
-    if ([windows count] > 0) {
-        NSWindow *win = (NSWindow *) [windows objectAtIndex:0];
+    for (NSWindow *win in windows)
+    {
+        if (win == window) {
+            continue;
+        }
+
         [win makeKeyAndOrderFront:self];
+        break;
     }
 }