diff options
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 7ac54e5c915..abf3c8672ff 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -402,21 +402,29 @@ void GHOST_WindowWin32::getClientBounds(GHOST_Rect &bounds) const { RECT rect; POINT coord; - ::GetClientRect(m_hWnd, &rect); + if (!IsIconic(m_hWnd)) { + ::GetClientRect(m_hWnd, &rect); - coord.x = rect.left; - coord.y = rect.top; - ::ClientToScreen(m_hWnd, &coord); + coord.x = rect.left; + coord.y = rect.top; + ::ClientToScreen(m_hWnd, &coord); - bounds.m_l = coord.x; - bounds.m_t = coord.y; + bounds.m_l = coord.x; + bounds.m_t = coord.y; - coord.x = rect.right; - coord.y = rect.bottom; - ::ClientToScreen(m_hWnd, &coord); + coord.x = rect.right; + coord.y = rect.bottom; + ::ClientToScreen(m_hWnd, &coord); - bounds.m_r = coord.x; - bounds.m_b = coord.y; + bounds.m_r = coord.x; + bounds.m_b = coord.y; + } + else { + bounds.m_b = 0; + bounds.m_l = 0; + bounds.m_r = 0; + bounds.m_t = 0; + } } |