From 60befcdc6297281ce226273123d3ccfc0a681aff Mon Sep 17 00:00:00 2001 From: Alexander Kuznetsov Date: Tue, 28 May 2013 18:36:47 +0000 Subject: Fix for r35524. Thanks Jeffrey Hoover for reporting. WM_SIZE is dispatched before full init. --- intern/ghost/intern/GHOST_SystemWin32.cpp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 96842f0d2e9..a0ebb2c25dc 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1162,9 +1162,16 @@ 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. */ - system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window)); - system->dispatchEvents(); - eventHandled = true; + /* we get first WM_SIZE before we fully init. So, do not dispatch before we continiously resizng */ + if(window->m_inLiveResize) + { + system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window)); + system->dispatchEvents(); + } + else + { + event = processWindowEvent(GHOST_kEventWindowSize, window); + } break; case WM_CAPTURECHANGED: window->lostMouseCapture(); @@ -1180,9 +1187,17 @@ 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. */ - system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window)); - system->dispatchEvents(); - eventHandled = true; + /* see WM_SIZE comment*/ + if(window->m_inLiveResize) + { + system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window)); + system->dispatchEvents(); + } + else + { + event = processWindowEvent(GHOST_kEventWindowMove, window); + } + break; //////////////////////////////////////////////////////////////////////// // Window events, ignored -- cgit v1.2.3