mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
Potentially better scrollbar patch
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2241 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
+35
-11
@@ -2,16 +2,40 @@ Index: gtk/gtkrange.c
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- gtk/gtkrange.c (revision 18523)
|
--- gtk/gtkrange.c (revision 18523)
|
||||||
+++ gtk/gtkrange.c (working copy)
|
+++ gtk/gtkrange.c (working copy)
|
||||||
@@ -1979,8 +1979,12 @@
|
@@ -99,6 +99,8 @@
|
||||||
gtk_widget_queue_draw (GTK_WIDGET (range));
|
|
||||||
|
|
||||||
/* This is so we don't lag the widget being scrolled. */
|
GtkSensitivityType lower_sensitivity;
|
||||||
+#if 0
|
GtkSensitivityType upper_sensitivity;
|
||||||
+ /* Disable this, the scroll bar lags a bit but the end result is that
|
+
|
||||||
+ scrolling treeviews is *a lot* smoother. See GNOME #460534. */
|
+ guint motion_idle;
|
||||||
if (GTK_WIDGET_REALIZED (range))
|
};
|
||||||
gdk_window_process_updates (GTK_WIDGET (range)->window, FALSE);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Note that we don't round off to range->round_digits here.
|
|
||||||
|
@@ -1721,6 +1723,16 @@
|
||||||
|
&handled);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static gboolean
|
||||||
|
+update_slider_position_idle (GtkRange *range)
|
||||||
|
+{
|
||||||
|
+ update_slider_position (range, range->layout->mouse_x,range->layout->mouse_y);
|
||||||
|
+
|
||||||
|
+ range->layout->motion_idle = 0;
|
||||||
|
+
|
||||||
|
+ return FALSE;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
stop_scrolling (GtkRange *range)
|
||||||
|
{
|
||||||
|
@@ -1860,8 +1872,8 @@
|
||||||
|
if (gtk_range_update_mouse_location (range))
|
||||||
|
gtk_widget_queue_draw (widget);
|
||||||
|
|
||||||
|
- if (range->layout->grab_location == MOUSE_SLIDER)
|
||||||
|
- update_slider_position (range, x, y);
|
||||||
|
+ if (range->layout->grab_location == MOUSE_SLIDER && !range->layout->motion_idle)
|
||||||
|
+ range->layout->motion_idle = g_idle_add ((GSourceFunc)update_slider_position_idle, range);
|
||||||
|
|
||||||
|
/* We handled the event if the mouse was in the range_rect */
|
||||||
|
return range->layout->mouse_location != MOUSE_OUTSIDE;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
require gtk+.inc
|
require gtk+.inc
|
||||||
|
|
||||||
PR = "r12"
|
PR = "r13"
|
||||||
|
|
||||||
SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.6/gtk+-${PV}.tar.bz2 \
|
SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.6/gtk+-${PV}.tar.bz2 \
|
||||||
file://no-demos.patch;patch=1 \
|
file://no-demos.patch;patch=1 \
|
||||||
|
|||||||
Reference in New Issue
Block a user