src/video/cocoa/SDL_cocoawindow.m
changeset 7535 c515121a3df7
parent 7534 f0f5143b27cf
child 7566 b14d00c30095
equal deleted inserted replaced
7534:f0f5143b27cf 7535:c515121a3df7
   156     if ([view nextResponder] == self) {
   156     if ([view nextResponder] == self) {
   157         [view setNextResponder:nil];
   157         [view setNextResponder:nil];
   158     }
   158     }
   159 
   159 
   160     /* Make the next window in the z-order Key. If we weren't the foreground
   160     /* Make the next window in the z-order Key. If we weren't the foreground
   161        when closed, this is a no-op. */
   161        when closed, this is a no-op.
       
   162        !!! FIXME: Note that this is a hack, and there are corner cases where
       
   163        !!! FIXME:  this fails (such as the About box). The typical nib+RunLoop
       
   164        !!! FIXME:  handles this for Cocoa apps, but we bypass all that in SDL.
       
   165        !!! FIXME:  We should remove this code when we find a better way to
       
   166        !!! FIXME:  have the system do this for us. See discussion in
       
   167        !!! FIXME:   http://bugzilla.libsdl.org/show_bug.cgi?id=1825
       
   168     */
   162     windows = [NSApp orderedWindows];
   169     windows = [NSApp orderedWindows];
   163     if ([windows count] > 0) {
   170     if ([windows count] > 0) {
   164         NSWindow *win = (NSWindow *) [windows objectAtIndex:0];
   171         NSWindow *win = (NSWindow *) [windows objectAtIndex:0];
   165         [win makeKeyAndOrderFront:self];
   172         [win makeKeyAndOrderFront:self];
   166     }
   173     }