[Bf-blender-cvs] [c1b18253b37] temp-benchmark: Convince Win32 harder to create non-resizeable window

Sergey Sharybin noreply at git.blender.org
Mon Aug 6 16:23:41 CEST 2018


Commit: c1b18253b3735c0d4f76ee87d4ddabc5819d5d63
Author: Sergey Sharybin
Date:   Mon Aug 6 16:23:19 2018 +0200
Branches: temp-benchmark
https://developer.blender.org/rBc1b18253b3735c0d4f76ee87d4ddabc5819d5d63

Convince Win32 harder to create non-resizeable window

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

M	intern/ghost/intern/GHOST_WindowWin32.cpp

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

diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 570a447a352..80af0a78eac 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -548,13 +548,14 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
 	if (state == GHOST_kWindowStateNormal)
 		state = m_normal_state;
 
+	int wintype = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
 	switch (state) {
 		case GHOST_kWindowStateMinimized:
 			wp.showCmd = SW_SHOWMINIMIZED;
 			break;
 		case GHOST_kWindowStateMaximized:
 			wp.showCmd = SW_SHOWMAXIMIZED;
-			::SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
+			::SetWindowLongPtr(m_hWnd, GWL_STYLE, wintype);
 			break;
 		case GHOST_kWindowStateFullScreen:
 			if (curstate != state && curstate != GHOST_kWindowStateMinimized)
@@ -570,7 +571,7 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
 		case GHOST_kWindowStateNormal:
 		default:
 			wp.showCmd = SW_SHOWNORMAL;
-			::SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
+			::SetWindowLongPtr(m_hWnd, GWL_STYLE, wintype);
 			break;
 	}
 	/* Clears window cache for SetWindowLongPtr */



More information about the Bf-blender-cvs mailing list