]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
setting clipping correctly
[wxWidgets.git] / src / msw / window.cpp
index e077df91af47b24c86cb1486e584194f4cfe3d47..7f55f0db5bc6ce10aa7a20d22e3c82ea7ba84fee 100644 (file)
@@ -1703,7 +1703,7 @@ void wxWindowMSW::DoGetPosition(int *x, int *y) const
         {
             if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
             {
-                // In RTL mode, we want the logical left x-coordinate, 
+                // In RTL mode, we want the logical left x-coordinate,
                 // which would be the physical right x-coordinate.
                 point.x = rect.right;
             }
@@ -3952,13 +3952,12 @@ bool wxWindowMSW::HandlePower(WXWPARAM WXUNUSED_IN_WINCE(wParam),
 
 bool wxWindowMSW::IsDoubleBuffered() const
 {
-    const wxWindow* wnd = this;
-
-    while ( wnd )
+    for ( const wxWindowMSW *wnd = this;
+          wnd && !wnd->IsTopLevel(); wnd =
+          wnd->GetParent() )
     {
-        if ( ::GetWindowLong((HWND)wnd->GetHWND(), GWL_EXSTYLE) & WS_EX_COMPOSITED )
+        if ( ::GetWindowLong(GetHwndOf(wnd), GWL_EXSTYLE) & WS_EX_COMPOSITED )
             return true;
-        wnd = wnd->GetParent();
     }
 
     return false;