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:
authorNathan Letwory <nathan@letworyinteractive.com>2008-01-05 16:56:40 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2008-01-05 16:56:40 +0300
commit1005d99ea5190f34c56f6b30d5eca6bf738a78e8 (patch)
treed3b08fd99db20bcc1efb4e09c420792a6d7ef984
parent30310a530a168a4b389df9323dc89a1ffdfdd983 (diff)
* GHOST win32: make sure window gets repositioned to 0,0 when setting state to fullscreen (maximised, borderless) (Patch by Gladstone)
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp27
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp2
2 files changed, 15 insertions, 14 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 9ddcd09cbc1..bd61b99a8f5 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -752,7 +752,19 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
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 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
* 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 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
*/
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
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index bcc989ca104..5a9e211926a 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -420,6 +420,8 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
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: