]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
User should no longer be able to modify disabled or read only child properties by...
[wxWidgets.git] / src / msw / window.cpp
index 7a81ded775d3a494a077a7c5d581211b2019e1cb..ea9a66c3c0db2be3e382d3cd8b6274140c277008 100644 (file)
@@ -1987,6 +1987,11 @@ void wxWindowMSW::DoMoveWindow(int x, int y, int width, int height)
 #if USE_DEFERRED_SIZING
         m_pendingPosition = wxPoint(x, y);
         m_pendingSize = wxSize(width, height);
+    }
+    else // window was moved immediately, without deferring it
+    {
+        m_pendingPosition = wxDefaultPosition;
+        m_pendingSize = wxDefaultSize;
 #endif // USE_DEFERRED_SIZING
     }
 }
@@ -3418,12 +3423,12 @@ WXLRESULT wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM l
                     rc.result = MSWDefWindowProc(message, wParam, lParam);
                     processed = true;
 
-                    // now alter the client size making room for drawing a themed border
-                    NCCALCSIZE_PARAMS *csparam = NULL;
+                    // now alter the client size making room for drawing a
+                    // themed border
                     RECT *rect;
                     if ( wParam )
                     {
-                        csparam = (NCCALCSIZE_PARAMS *)lParam;
+                        NCCALCSIZE_PARAMS *csparam = (NCCALCSIZE_PARAMS *)lParam;
                         rect = &csparam->rgrc[0];
                     }
                     else
@@ -4262,13 +4267,14 @@ bool wxWindowMSW::HandlePower(WXWPARAM WXUNUSED_IN_WINCE(wParam),
 
 bool wxWindowMSW::IsDoubleBuffered() const
 {
-    const wxWindowMSW *wnd = this;
-    do
+    for ( const wxWindowMSW *win = this; win; win = win->GetParent() )
     {
-        if ( wxHasWindowExStyle(wnd, WS_EX_COMPOSITED) )
+        if ( wxHasWindowExStyle(win, WS_EX_COMPOSITED) )
             return true;
-        wnd = wnd->GetParent();
-    } while ( wnd && !wnd->IsTopLevel() );
+
+        if ( win->IsTopLevel() )
+            break;
+    }
 
     return false;
 }