Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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 1079be6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -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
Expand Down Expand Up @@ -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];

Expand Down

0 comments on commit 1079be6

Please sign in to comment.