From: Julian Smart Date: Sun, 22 May 2005 15:57:20 +0000 (+0000) Subject: Applied patch [ 1197471 ] Scrolling of Widgets within a wxScrollWindow enabled X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/271f05f7addd11d373afd51062e1dd54fad375e1 Applied patch [ 1197471 ] Scrolling of Widgets within a wxScrollWindow enabled git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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(); + } } // ---------------------------------------------------------------------------