]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
remove extraneous returns
[wxWidgets.git] / src / msw / window.cpp
index 7a81ded775d3a494a077a7c5d581211b2019e1cb..f2b47d0fa4e255be7f579caef7ef8685caab9826 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
     }
 }
@@ -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;
 }