We can defer window creation.
authorSam Lantinga <slouken@libsdl.org>
Mon, 21 Feb 2011 21:32:11 -0800
changeset 537978c071fe4c37
parent 5378 738a96883fa6
child 5380 2de85077eb0b
We can defer window creation.
Added documentation for why we need an SDLView
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Mon Feb 21 20:35:44 2011 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Mon Feb 21 21:32:11 2011 -0800
     1.3 @@ -436,7 +436,9 @@
     1.4  }
     1.5  @end
     1.6  
     1.7 -@interface SDLView : NSView { }
     1.8 +@interface SDLView : NSView
     1.9 +/* The default implementation doesn't pass rightMouseDown to responder chain */
    1.10 +- (void)rightMouseDown:(NSEvent *)theEvent;
    1.11  @end
    1.12  
    1.13  @implementation SDLView
    1.14 @@ -598,7 +600,7 @@
    1.15              rect.origin.y -= screenRect.origin.y;
    1.16          }
    1.17      }
    1.18 -    nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:FALSE screen:screen];
    1.19 +    nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:YES screen:screen];
    1.20  
    1.21      [pool release];
    1.22