[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13139] branches/blender2.5/blender/intern /ghost/intern: * GHOST win32: make sure window gets repositioned to 0, 0 when setting state to fullscreen (maximised, borderless) ( Patch by Gladstone)

Nathan Letwory jesterking at letwory.net
Sat Jan 5 14:56:41 CET 2008


Revision: 13139
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13139
Author:   jesterking
Date:     2008-01-05 14:56:40 +0100 (Sat, 05 Jan 2008)

Log Message:
-----------
* GHOST win32: make sure window gets repositioned to 0,0 when setting state to fullscreen (maximised, borderless) (Patch by Gladstone)

Modified Paths:
--------------
    branches/blender2.5/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
    branches/blender2.5/blender/intern/ghost/intern/GHOST_WindowWin32.cpp

Modified: branches/blender2.5/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/blender2.5/blender/intern/ghost/intern/GHOST_SystemWin32.cpp	2008-01-05 13:55:30 UTC (rev 13138)
+++ branches/blender2.5/blender/intern/ghost/intern/GHOST_SystemWin32.cpp	2008-01-05 13:56:40 UTC (rev 13139)
@@ -752,7 +752,19 @@
 				case WM_CAPTURECHANGED:
 					window->lostMouseCapture();
 					break;
-
+				case WM_MOVING:
+					/* The WM_MOVING message is sent to a window that the user is moving. By processing 
+					 * this message, an application can monitor the size and position of the drag rectangle
+					 * and, if needed, change its size or position.
+					 */
+				case WM_MOVE:
+					/* The WM_SIZE and WM_MOVE messages are not sent if an application handles the 
+					 * WM_WINDOWPOSCHANGED message without calling DefWindowProc. It is more efficient
+					 * to perform any move or size change processing during the WM_WINDOWPOSCHANGED 
+					 * message without calling DefWindowProc. 
+					 */
+					event = processWindowEvent(GHOST_kEventWindowMove, window);
+					break;
 				////////////////////////////////////////////////////////////////////////
 				// Window events, ignored
 				////////////////////////////////////////////////////////////////////////
@@ -765,14 +777,6 @@
 					 * to perform any move or size change processing during the WM_WINDOWPOSCHANGED 
 					 * message without calling DefWindowProc.
 					 */
-				case WM_MOVE:
-					/* The WM_SIZE and WM_MOVE messages are not sent if an application handles the 
-					 * WM_WINDOWPOSCHANGED message without calling DefWindowProc. It is more efficient
-					 * to perform any move or size change processing during the WM_WINDOWPOSCHANGED 
-					 * message without calling DefWindowProc. 
-					 */
-					event = processWindowEvent(GHOST_kEventWindowMove, window);
-					break;
 				case WM_ERASEBKGND:
 					/* An application sends the WM_ERASEBKGND message when the window background must be 
 					 * erased (for example, when a window is resized). The message is sent to prepare an 
@@ -807,11 +811,6 @@
 					 */
 				case WM_SETFOCUS:
 					/* The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus. */
-				case WM_MOVING:
-					/* The WM_MOVING message is sent to a window that the user is moving. By processing 
-					 * this message, an application can monitor the size and position of the drag rectangle
-					 * and, if needed, change its size or position.
-					 */
 				case WM_ENTERSIZEMOVE:
 					/* The WM_ENTERSIZEMOVE message is sent one time to a window after it enters the moving 
 					 * or sizing modal loop. The window enters the moving or sizing modal loop when the user 

Modified: branches/blender2.5/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- branches/blender2.5/blender/intern/ghost/intern/GHOST_WindowWin32.cpp	2008-01-05 13:55:30 UTC (rev 13138)
+++ branches/blender2.5/blender/intern/ghost/intern/GHOST_WindowWin32.cpp	2008-01-05 13:56:40 UTC (rev 13139)
@@ -420,6 +420,8 @@
 		break;
 	case GHOST_kWindowStateFullScreen:
 		wp.showCmd = SW_SHOWMAXIMIZED;
+		wp.ptMaxPosition.x = 0;
+		wp.ptMaxPosition.y = 0;
 		SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_POPUP | WS_MAXIMIZE);
 		break;
 	case GHOST_kWindowStateNormal: 





More information about the Bf-blender-cvs mailing list