src/video/cocoa/SDL_cocoawindow.m
changeset 7771 4434498bf4b9
parent 7746 6a05d7352575
child 7873 e88af17231bd
equal deleted inserted replaced
7770:28031e0042b2 7771:4434498bf4b9
    42 @end
    42 @end
    43 #endif
    43 #endif
    44 
    44 
    45 static Uint32 s_moveHack;
    45 static Uint32 s_moveHack;
    46 
    46 
    47 static __inline__ void ConvertNSRect(NSRect *r)
    47 static void ConvertNSRect(NSRect *r)
    48 {
    48 {
    49     r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height;
    49     r->origin.y = CGDisplayPixelsHigh(kCGDirectMainDisplay) - r->origin.y - r->size.height;
    50 }
    50 }
    51 
    51 
    52 static void ScheduleContextUpdates(SDL_WindowData *data)
    52 static void ScheduleContextUpdates(SDL_WindowData *data)
   918 {
   918 {
   919     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
   919     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
   920     SDL_WindowData *windowData = ((SDL_WindowData *) window->driverdata);
   920     SDL_WindowData *windowData = ((SDL_WindowData *) window->driverdata);
   921     NSWindow *nswindow = windowData->nswindow;
   921     NSWindow *nswindow = windowData->nswindow;
   922 
   922 
   923     // makeKeyAndOrderFront: has the side-effect of deminiaturizing and showing
   923     /* makeKeyAndOrderFront: has the side-effect of deminiaturizing and showing
   924     // a minimized or hidden window, so check for that before showing it.
   924        a minimized or hidden window, so check for that before showing it.
       
   925      */
   925     [windowData->listener pauseVisibleObservation];
   926     [windowData->listener pauseVisibleObservation];
   926     if (![nswindow isMiniaturized] && [nswindow isVisible]) {
   927     if (![nswindow isMiniaturized] && [nswindow isVisible]) {
   927         [nswindow makeKeyAndOrderFront:nil];
   928         [nswindow makeKeyAndOrderFront:nil];
   928     }
   929     }
   929     [windowData->listener resumeVisibleObservation];
   930     [windowData->listener resumeVisibleObservation];