WinRT: emit SDL_WINDOWEVENT_SHOWN and SDL_WINDOWEVENT_HIDDEN
authorDavid Ludwig <dludwig@pobox.com>
Tue, 08 Jan 2013 23:30:21 -0500
changeset 8385e954dfbf2ecc
parent 8384 bc7a52629e1e
child 8386 7673e6a03628
WinRT: emit SDL_WINDOWEVENT_SHOWN and SDL_WINDOWEVENT_HIDDEN
src/video/windowsrt/SDL_WinRTApp.cpp
     1.1 --- a/src/video/windowsrt/SDL_WinRTApp.cpp	Tue Jan 08 23:11:22 2013 -0500
     1.2 +++ b/src/video/windowsrt/SDL_WinRTApp.cpp	Tue Jan 08 23:30:21 2013 -0500
     1.3 @@ -151,6 +151,13 @@
     1.4  void SDL_WinRTApp::OnVisibilityChanged(CoreWindow^ sender, VisibilityChangedEventArgs^ args)
     1.5  {
     1.6      m_windowVisible = args->Visible;
     1.7 +    if (m_sdlWindowData) {
     1.8 +        if (args->Visible) {
     1.9 +            SDL_SendWindowEvent(m_sdlWindowData->sdlWindow, SDL_WINDOWEVENT_SHOWN, 0, 0);
    1.10 +        } else {
    1.11 +            SDL_SendWindowEvent(m_sdlWindowData->sdlWindow, SDL_WINDOWEVENT_HIDDEN, 0, 0);
    1.12 +        }
    1.13 +    }
    1.14  }
    1.15  
    1.16  void SDL_WinRTApp::OnWindowClosed(CoreWindow^ sender, CoreWindowEventArgs^ args)