Skip to content

Commit

Permalink
macOS: bug-fix for #3793, "fullscreen toggle does not maintain SDL_Re…
Browse files Browse the repository at this point in the history
…nderer's logical size"

This also seems to fix the follow-up issue in bug #3719, whereby the initial fix caused the SDL window to move, after transitioning from fullscreen to windowed-mode
  • Loading branch information
DavidLudwig committed Sep 3, 2017
1 parent 2ea0990 commit 532446a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/video/cocoa/SDL_cocoawindow.m
Expand Up @@ -796,6 +796,13 @@ - (void)windowDidExitFullScreen:(NSNotification *)aNotification
s_moveHack = SDL_GetTicks();
}

/* Force the size change event in case it was delivered earlier
while the window was still animating into place.
*/
window->w = 0;
window->h = 0;
[self windowDidResize:aNotification];

/* FIXME: Why does the window get hidden? */
if (window->flags & SDL_WINDOW_SHOWN) {
Cocoa_ShowWindow(SDL_GetVideoDevice(), window);
Expand Down

0 comments on commit 532446a

Please sign in to comment.