]> git.saurik.com Git - wxWidgets.git/commitdiff
return true from IsDoubleBuffered() if our TLW parent is a composited window; the...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 2 Aug 2008 22:33:08 +0000 (22:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 2 Aug 2008 22:33:08 +0000 (22:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 7a81ded775d3a494a077a7c5d581211b2019e1cb..5ddf3d7a8cc966f7d19b942d1868ff3d3d31d08b 100644 (file)
@@ -4262,13 +4262,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;
 }