2008-11-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Tue, 25 Nov 2008 08:39:32 +0000 (08:39 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Tue, 25 Nov 2008 08:39:32 +0000 (08:39 -0000)
* 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

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs

index ae098ed0992b1c806c119713bfc1d4d46772a5d4..4a88a7de8cb26d8d266ef7aaaeebf99d739dd78b 100644 (file)
@@ -1,3 +1,11 @@
+2008-11-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * 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  <monkey@jpobst.com>
 
        * DataGridView.cs: Listen for a DataTable's TableCleared event so we
index deb9feb5668ce518ec133d221765ce7e71e45862..f901ffffe132077a3ee13cb0859d6d5ca8fc78fa 100644 (file)
@@ -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