Fixed window resizing when entering and leaving fullscreen mode
authorSam Lantinga <slouken@libsdl.org>
Mon, 11 Nov 2013 21:38:11 -0800
changeset 796456431f7d8f46
parent 7963 f06bbd9cd708
child 7965 d3cbe8ecb1af
Fixed window resizing when entering and leaving fullscreen mode
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Mon Nov 11 21:21:18 2013 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Mon Nov 11 21:38:11 2013 -0800
     1.3 @@ -452,18 +452,21 @@
     1.4  
     1.5  - (void)windowWillExitFullScreen:(NSNotification *)aNotification
     1.6  {
     1.7 +    SDL_Window *window = _data->window;
     1.8 +    NSWindow *nswindow = _data->nswindow;
     1.9 +
    1.10 +    if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
    1.11 +        [nswindow setStyleMask:GetWindowStyle(window)];
    1.12 +    }
    1.13 +
    1.14      isFullscreen = NO;
    1.15      inFullscreenTransition = YES;
    1.16  }
    1.17  
    1.18  - (void)windowDidExitFullScreen:(NSNotification *)aNotification
    1.19  {
    1.20 -    SDL_Window *window = _data->window;
    1.21      NSWindow *nswindow = _data->nswindow;
    1.22  
    1.23 -    if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
    1.24 -        [nswindow setStyleMask:GetWindowStyle(window)];
    1.25 -    }
    1.26      inFullscreenTransition = NO;
    1.27  
    1.28      if (pendingWindowOperation == PENDING_OPERATION_ENTER_FULLSCREEN) {