diff options
author | Alexander Kuznetsov <kuzsasha@gmail.com> | 2011-08-15 20:26:37 +0400 |
---|---|---|
committer | Alexander Kuznetsov <kuzsasha@gmail.com> | 2011-08-15 20:26:37 +0400 |
commit | 39cbcdf187ec64f0a897d0b123025022d1122b54 (patch) | |
tree | ba9b11b626455e0f41d38b256bcf45334b7bb914 /intern | |
parent | 65ca89180ac7e97c44b880f4056a956b55a671f5 (diff) |
Window was losing focus when switching from full screen via Alt+F11
Fixes [#28243]
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 1ba51376ff9..0c8c0adf041 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -612,7 +612,6 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state) wp.showCmd = SW_SHOWMINIMIZED; break; case GHOST_kWindowStateMaximized: - ShowWindow(m_hWnd, SW_HIDE); wp.showCmd = SW_SHOWMAXIMIZED; SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW); break; @@ -629,12 +628,12 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state) break; case GHOST_kWindowStateNormal: default: - ShowWindow(m_hWnd, SW_HIDE); wp.showCmd = SW_SHOWNORMAL; SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW); break; } - return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure; + SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); /*Clears window cache for SetWindowLongPtr */ + return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure; } |