# HG changeset patch # User David Ludwig # Date 1504474429 14400 # Sun Sep 03 17:33:49 2017 -0400 # Node ID f7629910563508e00d42eccef6613ff01974624c # Parent d1c34d85b47cff48ab8ef2f7fd3220758ca85950 macOS: bug-fix for #3793, "fullscreen toggle does not maintain SDL_Renderer'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 diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -796,6 +796,13 @@ 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);