Mac: Don't give windows focus back when we're closing them.
Fixes bug #1840 (https://bugzilla.libsdl.org/show_bug.cgi?id=1840)
1.1 --- a/src/video/cocoa/SDL_cocoawindow.m Wed Jan 15 11:17:09 2014 -0800
1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m Wed Jan 15 11:31:56 2014 -0800
1.3 @@ -299,9 +299,14 @@
1.4 !!! FIXME: http://bugzilla.libsdl.org/show_bug.cgi?id=1825
1.5 */
1.6 windows = [NSApp orderedWindows];
1.7 - if ([windows count] > 0) {
1.8 - NSWindow *win = (NSWindow *) [windows objectAtIndex:0];
1.9 + for (NSWindow *win in windows)
1.10 + {
1.11 + if (win == window) {
1.12 + continue;
1.13 + }
1.14 +
1.15 [win makeKeyAndOrderFront:self];
1.16 + break;
1.17 }
1.18 }
1.19