X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/00208f47e3a50246d9bf8eefb3dab688ed384ef0..b9698194c1dfba8c3ec3737eac492443c4c64545:/src/x11/window.cpp?ds=sidebyside diff --git a/src/x11/window.cpp b/src/x11/window.cpp index a76272ca40..82239d1163 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -667,6 +667,26 @@ void wxWindowX11::ScrollWindow(int dx, int dy, const wxRect *rect) } XFreeGC( xdisplay, xgc ); + + // Move Clients, but not the scrollbars + // FIXME: There may be a better method to move a lot of Windows within X11 + wxScrollBar *sbH = ((wxWindow *) this)->GetScrollbar( wxHORIZONTAL ); + wxScrollBar *sbV = ((wxWindow *) this)->GetScrollbar( wxVERTICAL ); + wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); + while ( node ) + { + // Only propagate to non-top-level windows + wxWindow *win = node->GetData(); + if ( win->GetParent() && win != sbH && win != sbV ) + { + wxPoint pos = win->GetPosition(); + // Add the delta to the old Position + pos.x += dx; + pos.y += dy; + win->SetPosition(pos); + } + node = node->GetNext(); + } } // ---------------------------------------------------------------------------