From ab0ccbeef9e1062b422d4d998f4f06de975a500a Mon Sep 17 00:00:00 2001 From: Daniel Genrich Date: Mon, 8 Jun 2009 11:55:16 +0000 Subject: [PATCH] Win GUI fix: maximize works again without distorted regions --- intern/ghost/intern/GHOST_WindowWin32.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 3ba2cedcf82..759951802af 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -127,8 +127,8 @@ GHOST_WindowWin32::GHOST_WindowWin32( s_windowClassName, // pointer to registered class name title, // pointer to window name WS_OVERLAPPEDWINDOW, // window style - rect.left, // horizontal position of window - rect.top, // vertical position of window + rect.left, // horizontal position of window + rect.top, // vertical position of window width, // window width height, // window height 0, // handle to parent or owner window @@ -301,9 +301,9 @@ void GHOST_WindowWin32::getClientBounds(GHOST_Rect& bounds) const RECT rect; LONG_PTR result = ::GetWindowLongPtr(m_hWnd, GWL_STYLE); - if((result & (WS_POPUP | WS_MAXIMIZE)) != (WS_POPUP | WS_MAXIMIZE)) { - SystemParametersInfo(SPI_GETWORKAREA,0,&rect,0); + ::GetWindowRect(m_hWnd, &rect); + if((result & (WS_POPUP | WS_MAXIMIZE)) != (WS_POPUP | WS_MAXIMIZE)) { bounds.m_b = rect.bottom-GetSystemMetrics(SM_CYCAPTION)-GetSystemMetrics(SM_CYSIZEFRAME)*2; bounds.m_l = rect.left; bounds.m_r = rect.right-GetSystemMetrics(SM_CYSIZEFRAME)*2;