summaryrefslogtreecommitdiffstats
path: root/meta/packages/gtk+
diff options
context:
space:
mode:
authorRoss Burton <ross@openedhand.com>2007-09-04 13:23:10 +0000
committerRoss Burton <ross@openedhand.com>2007-09-04 13:23:10 +0000
commit5338738593b8767947056eec8a810d34ad69c83c (patch)
treed93f49a6010a777e688bd20749acc0581126173f /meta/packages/gtk+
parent75fadfe1c8b8b9b18ae5dbcbb8aa76efd319548e (diff)
downloadpoky-5338738593b8767947056eec8a810d34ad69c83c.tar.gz
GTK+ 2.11: Update range patch
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2686 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gtk+')
-rw-r--r--meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch138
-rw-r--r--meta/packages/gtk+/gtk+_2.11.6.bb2
2 files changed, 112 insertions, 28 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
index 15de0c25d8..14387b8a2e 100644
--- a/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch
+++ b/meta/packages/gtk+/gtk+-2.11.6/range-no-redraw.patch
@@ -1,43 +1,127 @@
1Index: gtk/gtkrange.c 15f084ea0849d5967a3c22821542ecaaa8accb398
2=================================================================== 2diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
3--- gtk/gtkrange.c (revision 18523) 3index bd95351..64e0e59 100644
4+++ gtk/gtkrange.c (working copy) 4--- gtk/gtkrange.c
5@@ -99,8 +99,10 @@ 5+++ gtk/gtkrange.c
6 6@@ -109,6 +109,8 @@ struct _GtkRangeLayout
7 GtkSensitivityType lower_sensitivity;
8 GtkSensitivityType upper_sensitivity; 7 GtkSensitivityType upper_sensitivity;
9 8
10 gdouble fill_level; 9 gdouble fill_level;
11+ 10+
12+ guint motion_idle; 11+ guint motion_idle_id;
13 }; 12 };
14 13
15 14
16@@ -1721,6 +1723,16 @@ 15@@ -205,6 +207,8 @@ static gboolean gtk_range_real_change_value (GtkRange *range,
17 &handled); 16 static void gtk_range_update_value (GtkRange *range);
17 static gboolean gtk_range_key_press (GtkWidget *range,
18 GdkEventKey *event);
19+static void gtk_range_add_motion_idle (GtkRange *range);
20+static void gtk_range_remove_motion_idle (GtkRange *range);
21
22
23 static guint signals[LAST_SIGNAL];
24@@ -1167,6 +1171,7 @@ gtk_range_destroy (GtkObject *object)
25
26 gtk_range_remove_step_timer (range);
27 gtk_range_remove_update_timer (range);
28+ gtk_range_remove_motion_idle (range);
29
30 if (range->adjustment)
31 {
32@@ -1276,6 +1281,7 @@ gtk_range_unrealize (GtkWidget *widget)
33
34 gtk_range_remove_step_timer (range);
35 gtk_range_remove_update_timer (range);
36+ gtk_range_remove_motion_idle (range);
37
38 gdk_window_set_user_data (range->event_window, NULL);
39 gdk_window_destroy (range->event_window);
40@@ -2165,7 +2171,7 @@ gtk_range_motion_notify (GtkWidget *widget,
41 gtk_widget_queue_draw (widget);
42
43 if (range->layout->grab_location == MOUSE_SLIDER)
44- update_slider_position (range, x, y);
45+ gtk_range_add_motion_idle (range);
46
47 /* We handled the event if the mouse was in the range_rect */
48 return range->layout->mouse_location != MOUSE_OUTSIDE;
49@@ -3335,9 +3341,10 @@ initial_timeout (gpointer data)
50 g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL);
51
52 range = GTK_RANGE (data);
53- range->timer->timeout_id = gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR,
54- second_timeout,
55- range);
56+ range->timer->timeout_id =
57+ gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR,
58+ second_timeout,
59+ range);
60 /* remove self */
61 return FALSE;
62 }
63@@ -3357,9 +3364,8 @@ gtk_range_add_step_timer (GtkRange *range,
64
65 range->timer = g_new (GtkRangeStepTimer, 1);
66
67- range->timer->timeout_id = gdk_threads_add_timeout (timeout,
68- initial_timeout,
69- range);
70+ range->timer->timeout_id =
71+ gdk_threads_add_timeout (timeout, initial_timeout, range);
72 range->timer->step = step;
73
74 gtk_range_scroll (range, range->timer->step);
75@@ -3397,9 +3403,8 @@ gtk_range_reset_update_timer (GtkRange *range)
76 {
77 gtk_range_remove_update_timer (range);
78
79- range->update_timeout_id = gdk_threads_add_timeout (UPDATE_DELAY,
80- update_timeout,
81- range);
82+ range->update_timeout_id =
83+ gdk_threads_add_timeout (UPDATE_DELAY, update_timeout, range);
84 }
85
86 static void
87@@ -3412,5 +3417,40 @@ gtk_range_remove_update_timer (GtkRange *range)
88 }
18 } 89 }
19 90
20+static gboolean 91+static gboolean
21+update_slider_position_idle (GtkRange *range) 92+motion_idle (gpointer data)
22+{ 93+{
23+ update_slider_position (range, range->layout->mouse_x,range->layout->mouse_y); 94+ GtkRange *range = data;
95+ GtkRangeLayout *layout = range->layout;
24+ 96+
25+ range->layout->motion_idle = 0; 97+ update_slider_position (range, layout->mouse_x, layout->mouse_y);
98+
99+ layout->motion_idle_id = 0;
26+ 100+
27+ return FALSE; 101+ return FALSE;
28+} 102+}
29+ 103+
30 static void 104+static void
31 stop_scrolling (GtkRange *range) 105+gtk_range_add_motion_idle (GtkRange *range)
32 { 106+{
33@@ -1860,8 +1872,8 @@ 107+ if (!range->layout->motion_idle_id)
34 if (gtk_range_update_mouse_location (range)) 108+ {
35 gtk_widget_queue_draw (widget); 109+ range->layout->motion_idle_id =
36 110+ gdk_threads_add_idle_full (GDK_PRIORITY_REDRAW,
37- if (range->layout->grab_location == MOUSE_SLIDER) 111+ motion_idle, range,
38- update_slider_position (range, x, y); 112+ NULL);
39+ if (range->layout->grab_location == MOUSE_SLIDER && !range->layout->motion_idle) 113+ }
40+ range->layout->motion_idle = g_idle_add ((GSourceFunc)update_slider_position_idle, range); 114+}
41 115+
42 /* We handled the event if the mouse was in the range_rect */ 116+static void
43 return range->layout->mouse_location != MOUSE_OUTSIDE; 117+gtk_range_remove_motion_idle (GtkRange *range)
118+{
119+ if (range->layout->motion_idle_id != 0)
120+ {
121+ g_source_remove (range->layout->motion_idle_id);
122+ range->layout->motion_idle_id = 0;
123+ }
124+}
125+
126 #define __GTK_RANGE_C__
127 #include "gtkaliasdef.c"
diff --git a/meta/packages/gtk+/gtk+_2.11.6.bb b/meta/packages/gtk+/gtk+_2.11.6.bb
index 6aa9d052af..186923b068 100644
--- a/meta/packages/gtk+/gtk+_2.11.6.bb
+++ b/meta/packages/gtk+/gtk+_2.11.6.bb
@@ -1,7 +1,7 @@
1require gtk+.inc 1require gtk+.inc
2 2
3DEPENDS += "cairo" 3DEPENDS += "cairo"
4PR = "r2" 4PR = "r3"
5 5
6# disable per default - untested and not all patches included. 6# disable per default - untested and not all patches included.
7DEFAULT_PREFERENCE = "-1" 7DEFAULT_PREFERENCE = "-1"