From bc7eda930d0732a4b02a3cfd39cd3727023535f0 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 2 Nov 2011 19:58:39 +0000 Subject: [PATCH] trying to fix alt-tab issue in windows --- source/shared_lib/sources/platform/sdl/window.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/shared_lib/sources/platform/sdl/window.cpp b/source/shared_lib/sources/platform/sdl/window.cpp index f4a27dde..ca948f84 100644 --- a/source/shared_lib/sources/platform/sdl/window.cpp +++ b/source/shared_lib/sources/platform/sdl/window.cpp @@ -239,6 +239,10 @@ bool Window::handleEvent() { } else { Window::isActive = true; +#ifdef WIN32 + HWND handle = GetSDLWindow(); + ShowWindow(handle, SW_SHOW); +#endif } if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive); @@ -256,6 +260,10 @@ bool Window::handleEvent() { //else if (event.active.gain == 1) { else { Window::isActive = true; +#ifdef WIN32 + HWND handle = GetSDLWindow(); + ShowWindow(handle, SW_SHOW); +#endif } if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] Window::isActive = %d, event.active.state = %d\n",__FILE__,__FUNCTION__,__LINE__,Window::isActive,event.active.state);