]> git.saurik.com Git - wxWidgets.git/commitdiff
Returning WVR_REDRAW triggers Windows bug that moves child windows, so don't use it.
authorJulian Smart <julian@anthemion.co.uk>
Tue, 22 Sep 2009 15:20:17 +0000 (15:20 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 22 Sep 2009 15:20:17 +0000 (15:20 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 22f1b2f29f8e9146904978a7552ed5de862103a6..58803775e8104bf04b00db00686edda458292180 100644 (file)
@@ -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;
                     }
                 }
             }