diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 1e5c24fdf..be6f6cf29 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -451,12 +451,6 @@ GetWindowStyle(SDL_Window * window) } - (void)windowWillExitFullScreen:(NSNotification *)aNotification -{ - isFullscreen = NO; - inFullscreenTransition = YES; -} - -- (void)windowDidExitFullScreen:(NSNotification *)aNotification { SDL_Window *window = _data->window; NSWindow *nswindow = _data->nswindow; @@ -464,6 +458,15 @@ GetWindowStyle(SDL_Window * window) if (!(window->flags & SDL_WINDOW_RESIZABLE)) { [nswindow setStyleMask:GetWindowStyle(window)]; } + + isFullscreen = NO; + inFullscreenTransition = YES; +} + +- (void)windowDidExitFullScreen:(NSNotification *)aNotification +{ + NSWindow *nswindow = _data->nswindow; + inFullscreenTransition = NO; if (pendingWindowOperation == PENDING_OPERATION_ENTER_FULLSCREEN) {