Skip to content

Commit

Permalink
Fixed window resizing when entering and leaving fullscreen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 12, 2013
1 parent 7cf76ff commit 8f8070d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -452,18 +452,21 @@ - (void)windowDidEnterFullScreen:(NSNotification *)aNotification

- (void)windowWillExitFullScreen:(NSNotification *)aNotification
{
SDL_Window *window = _data->window;
NSWindow *nswindow = _data->nswindow;

if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
[nswindow setStyleMask:GetWindowStyle(window)];
}

isFullscreen = NO;
inFullscreenTransition = YES;
}

- (void)windowDidExitFullScreen:(NSNotification *)aNotification
{
SDL_Window *window = _data->window;
NSWindow *nswindow = _data->nswindow;

if (!(window->flags & SDL_WINDOW_RESIZABLE)) {
[nswindow setStyleMask:GetWindowStyle(window)];
}
inFullscreenTransition = NO;

if (pendingWindowOperation == PENDING_OPERATION_ENTER_FULLSCREEN) {
Expand Down

0 comments on commit 8f8070d

Please sign in to comment.