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
This commit is contained in:
parent
562e35787c
commit
271f05f7ad
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user