Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2021-03-21 03:24:06 +0300
committerHarley Acheson <harley.acheson@gmail.com>2021-03-21 03:24:06 +0300
commitb4e96550ce595a3f3c50a251033b41c2c117260a (patch)
tree41c3b3094fec3deafb910c6b063bd11bd80806cb
parent9ca67c47a152a24e0740dbedc09a4bfeec2b6d73 (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.cpp2
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;
}