summaryrefslogtreecommitdiffstats
path: root/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch')
-rw-r--r--meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch b/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch
new file mode 100644
index 0000000000..e3603d7700
--- /dev/null
+++ b/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch
@@ -0,0 +1,41 @@
1Index: gtk/gtkrange.c
2===================================================================
3--- gtk/gtkrange.c (revision 18523)
4+++ gtk/gtkrange.c (working copy)
5@@ -99,6 +99,8 @@
6
7 GtkSensitivityType lower_sensitivity;
8 GtkSensitivityType upper_sensitivity;
9+
10+ guint motion_idle;
11 };
12
13
14@@ -1721,6 +1723,16 @@
15 &handled);
16 }
17
18+static gboolean
19+update_slider_position_idle (GtkRange *range)
20+{
21+ update_slider_position (range, range->layout->mouse_x,range->layout->mouse_y);
22+
23+ range->layout->motion_idle = 0;
24+
25+ return FALSE;
26+}
27+
28 static void
29 stop_scrolling (GtkRange *range)
30 {
31@@ -1860,8 +1872,8 @@
32 if (gtk_range_update_mouse_location (range))
33 gtk_widget_queue_draw (widget);
34
35- if (range->layout->grab_location == MOUSE_SLIDER)
36- update_slider_position (range, x, y);
37+ if (range->layout->grab_location == MOUSE_SLIDER && !range->layout->motion_idle)
38+ range->layout->motion_idle = g_idle_add ((GSourceFunc)update_slider_position_idle, range);
39
40 /* We handled the event if the mouse was in the range_rect */
41 return range->layout->mouse_location != MOUSE_OUTSIDE;