From aff6d9eae7b8f034aa3ee2d958a6aed51b182636 Mon Sep 17 00:00:00 2001 From: Carlos Alberto Cortez Date: Tue, 25 Nov 2008 08:39:32 +0000 Subject: [PATCH] 2008-11-24 Carlos Alberto Cortez * ScrollableControl.cs: When scrolling, don't invalidate the entire area, and call to XplatUIX11.ScrollWindow instead. This is exactly what .Net does: copy the visible area, and only invalidate the part of the area that wasn't visible before scrolling. Fixes #441738. svn path=/trunk/mcs/; revision=119930 --- .../Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 8 ++++++++ .../System.Windows.Forms/ScrollableControl.cs | 4 +--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index ae098ed0992..4a88a7de8cb 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,11 @@ +2008-11-24 Carlos Alberto Cortez + + * ScrollableControl.cs: When scrolling, don't invalidate the entire + area, and call to XplatUIX11.ScrollWindow instead. This is exactly + what .Net does: copy the visible area, and only invalidate the part of + the area that wasn't visible before scrolling. + Fixes #441738. + 2008-11-24 Jonathan Pobst * DataGridView.cs: Listen for a DataTable's TableCleared event so we diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs index deb9feb5668..f901ffffe13 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs @@ -1129,9 +1129,7 @@ namespace System.Windows.Forms { scroll_position.X += XOffset; scroll_position.Y += YOffset; - // Should we call XplatUI.ScrollWindow??? If so, we need to position our windows by other means above - // Since we're already causing a redraw above - Invalidate(false); + XplatUI.ScrollWindow (Handle, ClientRectangle, -XOffset, -YOffset, false); ResumeLayout(false); } #endregion // Internal & Private Methods -- 2.25.1