From 1079be6aa2050d3936973fd5c15d1e15b528e367 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 21 Feb 2011 21:32:11 -0800 Subject: [PATCH] We can defer window creation. Added documentation for why we need an SDLView --- src/video/cocoa/SDL_cocoawindow.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 9d460c486..8aca2a290 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -436,7 +436,9 @@ - (BOOL)canBecomeMainWindow } @end -@interface SDLView : NSView { } +@interface SDLView : NSView +/* The default implementation doesn't pass rightMouseDown to responder chain */ +- (void)rightMouseDown:(NSEvent *)theEvent; @end @implementation SDLView @@ -598,7 +600,7 @@ - (void)rightMouseDown:(NSEvent *)theEvent rect.origin.y -= screenRect.origin.y; } } - nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:FALSE screen:screen]; + nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:YES screen:screen]; [pool release];