X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e992e06a71d90f1df597441af36f69ef390089a..e69d5138dc8f95e294ae6d03beb4f321406f4e34:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index e077df91af..7f55f0db5b 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -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;