[Bf-blender-cvs] [b4e96550ce5] master: Fix T86643: Win32 Entering Full Screen While Maximized

Harley Acheson noreply at git.blender.org
Sun Mar 21 01:25:28 CET 2021


Commit: b4e96550ce595a3f3c50a251033b41c2c117260a
Author: Harley Acheson
Date:   Sat Mar 20 17:24:06 2021 -0700
Branches: master
https://developer.blender.org/rBb4e96550ce595a3f3c50a251033b41c2c117260a

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

===================================================================

M	intern/ghost/intern/GHOST_WindowWin32.cpp

===================================================================

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;
 }



More information about the Bf-blender-cvs mailing list