diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 15:14:24 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-27 15:29:45 +0100 |
commit | 29d6678fd546377459ef75cf54abeef5b969b5cf (patch) | |
tree | 8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-gnome/gtk+/gtk+-2.12.7/range-no-redraw.patch | |
parent | da49de6885ee1bc424e70bc02f21f6ab920efb55 (diff) | |
download | openembedded-core-contrib-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz |
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things
and is generally overwhelming. This commit splits it into several
logical sections roughly based on function, recipes.txt gives more
information about the classifications used.
The opportunity is also used to switch from "packages" to "recipes"
as used in OpenEmbedded as the term "packages" can be confusing to
people and has many different meanings.
Not all recipes have been classified yet, this is just a first pass
at separating things out. Some packages are moved to meta-extras as
they're no longer actively used or maintained.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-gnome/gtk+/gtk+-2.12.7/range-no-redraw.patch')
-rw-r--r-- | meta/recipes-gnome/gtk+/gtk+-2.12.7/range-no-redraw.patch | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.12.7/range-no-redraw.patch b/meta/recipes-gnome/gtk+/gtk+-2.12.7/range-no-redraw.patch new file mode 100644 index 0000000000..14387b8a2e --- /dev/null +++ b/meta/recipes-gnome/gtk+/gtk+-2.12.7/range-no-redraw.patch @@ -0,0 +1,127 @@ +5f084ea0849d5967a3c22821542ecaaa8accb398 +diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c +index bd95351..64e0e59 100644 +--- gtk/gtkrange.c ++++ gtk/gtkrange.c +@@ -109,6 +109,8 @@ struct _GtkRangeLayout + GtkSensitivityType upper_sensitivity; + + gdouble fill_level; ++ ++ guint motion_idle_id; + }; + + +@@ -205,6 +207,8 @@ static gboolean gtk_range_real_change_value (GtkRange *range, + static void gtk_range_update_value (GtkRange *range); + static gboolean gtk_range_key_press (GtkWidget *range, + GdkEventKey *event); ++static void gtk_range_add_motion_idle (GtkRange *range); ++static void gtk_range_remove_motion_idle (GtkRange *range); + + + static guint signals[LAST_SIGNAL]; +@@ -1167,6 +1171,7 @@ gtk_range_destroy (GtkObject *object) + + gtk_range_remove_step_timer (range); + gtk_range_remove_update_timer (range); ++ gtk_range_remove_motion_idle (range); + + if (range->adjustment) + { +@@ -1276,6 +1281,7 @@ gtk_range_unrealize (GtkWidget *widget) + + gtk_range_remove_step_timer (range); + gtk_range_remove_update_timer (range); ++ gtk_range_remove_motion_idle (range); + + gdk_window_set_user_data (range->event_window, NULL); + gdk_window_destroy (range->event_window); +@@ -2165,7 +2171,7 @@ gtk_range_motion_notify (GtkWidget *widget, + gtk_widget_queue_draw (widget); + + if (range->layout->grab_location == MOUSE_SLIDER) +- update_slider_position (range, x, y); ++ gtk_range_add_motion_idle (range); + + /* We handled the event if the mouse was in the range_rect */ + return range->layout->mouse_location != MOUSE_OUTSIDE; +@@ -3335,9 +3341,10 @@ initial_timeout (gpointer data) + g_object_get (settings, "gtk-timeout-repeat", &timeout, NULL); + + range = GTK_RANGE (data); +- range->timer->timeout_id = gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR, +- second_timeout, +- range); ++ range->timer->timeout_id = ++ gdk_threads_add_timeout (timeout * SCROLL_DELAY_FACTOR, ++ second_timeout, ++ range); + /* remove self */ + return FALSE; + } +@@ -3357,9 +3364,8 @@ gtk_range_add_step_timer (GtkRange *range, + + range->timer = g_new (GtkRangeStepTimer, 1); + +- range->timer->timeout_id = gdk_threads_add_timeout (timeout, +- initial_timeout, +- range); ++ range->timer->timeout_id = ++ gdk_threads_add_timeout (timeout, initial_timeout, range); + range->timer->step = step; + + gtk_range_scroll (range, range->timer->step); +@@ -3397,9 +3403,8 @@ gtk_range_reset_update_timer (GtkRange *range) + { + gtk_range_remove_update_timer (range); + +- range->update_timeout_id = gdk_threads_add_timeout (UPDATE_DELAY, +- update_timeout, +- range); ++ range->update_timeout_id = ++ gdk_threads_add_timeout (UPDATE_DELAY, update_timeout, range); + } + + static void +@@ -3412,5 +3417,40 @@ gtk_range_remove_update_timer (GtkRange *range) + } + } + ++static gboolean ++motion_idle (gpointer data) ++{ ++ GtkRange *range = data; ++ GtkRangeLayout *layout = range->layout; ++ ++ update_slider_position (range, layout->mouse_x, layout->mouse_y); ++ ++ layout->motion_idle_id = 0; ++ ++ return FALSE; ++} ++ ++static void ++gtk_range_add_motion_idle (GtkRange *range) ++{ ++ if (!range->layout->motion_idle_id) ++ { ++ range->layout->motion_idle_id = ++ gdk_threads_add_idle_full (GDK_PRIORITY_REDRAW, ++ motion_idle, range, ++ NULL); ++ } ++} ++ ++static void ++gtk_range_remove_motion_idle (GtkRange *range) ++{ ++ if (range->layout->motion_idle_id != 0) ++ { ++ g_source_remove (range->layout->motion_idle_id); ++ range->layout->motion_idle_id = 0; ++ } ++} ++ + #define __GTK_RANGE_C__ + #include "gtkaliasdef.c" |