Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
We can defer window creation.
Added documentation for why we need an SDLView
  • Loading branch information
slouken committed Feb 22, 2011
1 parent 3fd2e68 commit 1079be6aa2050d3936973fd5c15d1e15b528e367
Showing with 4 additions and 2 deletions.
  1. +4 −2 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];

0 comments on commit 1079be6

Please sign in to comment.