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
This commit is contained in:
Vadim Zeitlin 2008-08-02 22:33:08 +00:00
parent d66d050088
commit 75e8e6dc29

View 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;
}