From 75e8e6dc29ce30e19ca195a08d9a5ece762c5f6e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Aug 2008 22:33:08 +0000 Subject: [PATCH] return true from IsDoubleBuffered() if our TLW parent is a composited window; the old version returned false in this case which probably was unintentional as it doesn't seem to make sense (see #9666) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 7a81ded775..5ddf3d7a8c 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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; } -- 2.45.2