diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2021-03-21 03:24:06 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2021-03-21 03:24:06 +0300 |
commit | b4e96550ce595a3f3c50a251033b41c2c117260a (patch) | |
tree | 41c3b3094fec3deafb910c6b063bd11bd80806cb | |
parent | 9ca67c47a152a24e0740dbedc09a4bfeec2b6d73 (diff) |
Fix T86643: Win32 Entering Full Screen While Maximized
SetWindowPos must be called after SetWindowLongPtr in order to see changes to window frame style.
Differential Revision: https://developer.blender.org/D10756
Reviewed by Ray Molenkamp
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index cfc1041da19..70901954df2 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -541,6 +541,8 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state) break; } ::SetWindowLongPtr(m_hWnd, GWL_STYLE, style); + /* SetWindowLongPtr Docs: frame changes not visible until SetWindowPos with SWP_FRAMECHANGED. */ + ::SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure; } |