WinRT: made bug 3202/3213's fix apply for WinRT apps
authorDavid Ludwig <dludwig@pobox.com>
Sun, 27 Dec 2015 22:26:27 -0500
changeset 9971fa7c016ac2d3
parent 9970 41d6973a250f
child 9972 734c90ea9990
WinRT: made bug 3202/3213's fix apply for WinRT apps
src/core/winrt/SDL_winrtapp_direct3d.cpp
     1.1 --- a/src/core/winrt/SDL_winrtapp_direct3d.cpp	Sun Dec 27 18:56:46 2015 -0500
     1.2 +++ b/src/core/winrt/SDL_winrtapp_direct3d.cpp	Sun Dec 27 22:26:27 2015 -0500
     1.3 @@ -218,7 +218,17 @@
     1.4              }
     1.5  #endif
     1.6  
     1.7 -            WINRT_UpdateWindowFlags(window, SDL_WINDOW_MAXIMIZED | SDL_WINDOW_FULLSCREEN_DESKTOP);
     1.8 +            const Uint32 latestFlags = WINRT_DetectWindowFlags(window);
     1.9 +            if (latestFlags & SDL_WINDOW_MAXIMIZED) {
    1.10 +                /* SDL_SendWindowEvent, as of this writing (2015-Dec-27), *won't* actually
    1.11 +                   send events if the associated flag is already set.  This is taken
    1.12 +                   advantage of here.  The below call is only meant to send a
    1.13 +                   window event, if and when it is needed!
    1.14 +                */
    1.15 +                SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MAXIMIZED, 0, 0);
    1.16 +            }
    1.17 +
    1.18 +            WINRT_UpdateWindowFlags(window, SDL_WINDOW_FULLSCREEN_DESKTOP);
    1.19  
    1.20              /* The window can move during a resize event, such as when maximizing
    1.21                 or resizing from a corner */