src/video/cocoa/SDL_cocoawindow.m
changeset 1973 81255f93dfcd
parent 1962 c92e5f3e68d9
child 2059 4685ccd33d0e
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Sun Aug 06 07:29:38 2006 +0000
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Sun Aug 06 08:55:37 2006 +0000
     1.3 @@ -262,6 +262,24 @@
     1.4  
     1.5  @end
     1.6  
     1.7 +@interface SDLWindow : NSWindow
     1.8 +/* These are needed for borderless/fullscreen windows */
     1.9 +- (BOOL)canBecomeKeyWindow;
    1.10 +- (BOOL)canBecomeMainWindow;
    1.11 +@end
    1.12 +
    1.13 +@implementation SDLWindow
    1.14 +- (BOOL)canBecomeKeyWindow
    1.15 +{
    1.16 +    return YES;
    1.17 +}
    1.18 +
    1.19 +- (BOOL)canBecomeMainWindow
    1.20 +{
    1.21 +    return YES;
    1.22 +}
    1.23 +@end
    1.24 +
    1.25  static int
    1.26  SetupWindowData(_THIS, SDL_Window * window, NSWindow *nswindow, SDL_bool created)
    1.27  {
    1.28 @@ -379,7 +397,7 @@
    1.29          style |= NSResizableWindowMask;
    1.30      }
    1.31  
    1.32 -    nswindow = [[NSWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:FALSE];
    1.33 +    nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:FALSE];
    1.34  
    1.35      [pool release];
    1.36