From 140d93c02405492f501c61e2c59e9a10a0e19575 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 22 Sep 2009 15:20:17 +0000 Subject: [PATCH] Returning WVR_REDRAW triggers Windows bug that moves child windows, so don't use it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 22f1b2f29f..58803775e8 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3446,9 +3446,10 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l // now alter the client size making room for drawing a // themed border RECT *rect; + NCCALCSIZE_PARAMS *csparam = NULL; if ( wParam ) { - NCCALCSIZE_PARAMS *csparam = (NCCALCSIZE_PARAMS *)lParam; + csparam = (NCCALCSIZE_PARAMS *)lParam; rect = &csparam->rgrc[0]; } else @@ -3471,8 +3472,14 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l &rcClient) == S_OK ) { InflateRect(&rcClient, -1, -1); - *rect = rcClient; - rc.result = WVR_REDRAW; + if (wParam) + csparam->rgrc[0] = rcClient; + else + *((RECT*)lParam) = rcClient; + + // WVR_REDRAW triggers a bug whereby child windows are moved up and left, + // so don't use. + // rc.result = WVR_REDRAW; } } } -- 2.47.2