diff --git a/Source/Client/Application/ApplicationWindow.cpp b/Source/Client/Application/ApplicationWindow.cpp index caf153e51..9743967a0 100644 --- a/Source/Client/Application/ApplicationWindow.cpp +++ b/Source/Client/Application/ApplicationWindow.cpp @@ -128,22 +128,23 @@ LRESULT CALLBACK WindowProc(HWND window, UINT message, WPARAM wParam, LPARAM lPa g_mouse.active = 1; } - if (!GetRenderSystemHolder()->IsWindowed()) { + if (GetRenderSystemHolder()->IsWindowed()) { if (g_isAppActive == 1) { g_restoreSurfaces = 1; + ShowWindow(window, SW_MAXIMIZE); + return 1; + } + CWebBrowser* browser = g_windowMgr.FindBrowser(reinterpret_cast(lParam)); + if (browser && browser->MatchesWindow(reinterpret_cast(lParam))) { + SetApplicationActive(1); + } else { + ShowWindow(window, SW_MINIMIZE); } return 1; } + if (g_isAppActive == 1) { g_restoreSurfaces = 1; - ShowWindow(window, SW_MAXIMIZE); - return 1; - } - CWebBrowser* browser = g_windowMgr.FindBrowser(reinterpret_cast(lParam)); - if (browser && browser->MatchesWindow(reinterpret_cast(lParam))) { - SetApplicationActive(1); - } else { - ShowWindow(window, SW_MINIMIZE); } return 1; }