From 13c47b89cbe2683cf5cde875ec17630f547e1778 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 19 2015 03:45:30 +0000 Subject: import clutter-1.20.0-4.el7 --- diff --git a/.clutter.metadata b/.clutter.metadata index d40c210..f26b0ed 100644 --- a/.clutter.metadata +++ b/.clutter.metadata @@ -1 +1 @@ -57f87cacb2d0133656e627e16eefaa6150b4a4a2 SOURCES/clutter-1.14.4.tar.xz +9939b90268e44c5500f44f3b11665eafabe8193e SOURCES/clutter-1.20.0.tar.xz diff --git a/.gitignore b/.gitignore index defb9ac..bf2e81a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/clutter-1.14.4.tar.xz +SOURCES/clutter-1.20.0.tar.xz diff --git a/SOURCES/0001-cally-Use-a-weak-pointer-to-hold-the-key-focus-in-Ca.patch b/SOURCES/0001-cally-Use-a-weak-pointer-to-hold-the-key-focus-in-Ca.patch deleted file mode 100644 index 0e7b6cd..0000000 --- a/SOURCES/0001-cally-Use-a-weak-pointer-to-hold-the-key-focus-in-Ca.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 19391a9626b087bd4df452e8699d53caa54c350f Mon Sep 17 00:00:00 2001 -From: Emmanuele Bassi -Date: Mon, 6 May 2013 15:46:25 -0700 -Subject: [PATCH] cally: Use a weak pointer to hold the key focus in CallyStage - -We want to avoid the pointer getting stale, and causing crashes. - -https://bugzilla.gnome.org/show_bug.cgi?id=692706 ---- - clutter/cally/cally-stage.c | 20 ++++++++++++++++++-- - 1 file changed, 18 insertions(+), 2 deletions(-) - -diff --git a/clutter/cally/cally-stage.c b/clutter/cally/cally-stage.c -index 2b1cfd1..c95ccb0 100644 ---- a/clutter/cally/cally-stage.c -+++ b/clutter/cally/cally-stage.c -@@ -139,7 +139,11 @@ cally_stage_notify_key_focus_cb (ClutterStage *stage, - AtkObject *old = NULL; - - if (self->priv->key_focus != NULL) -- old = clutter_actor_get_accessible (self->priv->key_focus); -+ { -+ g_object_remove_weak_pointer (G_OBJECT (self->priv->key_focus), -+ (gpointer *) &self->priv->key_focus); -+ old = clutter_actor_get_accessible (self->priv->key_focus); -+ } - else - old = clutter_actor_get_accessible (CLUTTER_ACTOR (stage)); - -@@ -154,7 +158,19 @@ cally_stage_notify_key_focus_cb (ClutterStage *stage, - self->priv->key_focus = key_focus; - - if (key_focus != NULL) -- new = clutter_actor_get_accessible (key_focus); -+ { -+ /* ensure that if the key focus goes away, the field inside -+ * CallyStage is reset. see bug: -+ * -+ * https://bugzilla.gnome.org/show_bug.cgi?id=692706 -+ * -+ * we remove the weak pointer above. -+ */ -+ g_object_add_weak_pointer (G_OBJECT (self->priv->key_focus), -+ (gpointer *) &self->priv->key_focus); -+ -+ new = clutter_actor_get_accessible (key_focus); -+ } - else - new = clutter_actor_get_accessible (CLUTTER_ACTOR (stage)); - --- -1.8.1.4 - diff --git a/SOURCES/0001-clutter-offscreen-effect-Allocate-the-cogl-texture-d.patch b/SOURCES/0001-clutter-offscreen-effect-Allocate-the-cogl-texture-d.patch deleted file mode 100644 index 259ad86..0000000 --- a/SOURCES/0001-clutter-offscreen-effect-Allocate-the-cogl-texture-d.patch +++ /dev/null @@ -1,45 +0,0 @@ -From b416224d30ea5ace492f1497101a172a6fb32997 Mon Sep 17 00:00:00 2001 -From: Adel Gadllah -Date: Tue, 25 Jun 2013 15:04:19 +0200 -Subject: [PATCH] clutter-offscreen-effect: Allocate the cogl texture directly - -Cogl now lazy loads the textures so we cannot rely on getting NULL -from cogl_texture_new_with_size so we have to allocate it by ourselves. - -https://bugzilla.redhat.com/show_bug.cgi?id=975171 ---- - clutter/clutter-offscreen-effect.c | 18 +++++++++++++++--- - 1 file changed, 15 insertions(+), 3 deletions(-) - -diff --git a/clutter/clutter-offscreen-effect.c b/clutter/clutter-offscreen-effect.c -index b655b5d..d3ffaea 100644 ---- a/clutter/clutter-offscreen-effect.c -+++ b/clutter/clutter-offscreen-effect.c -@@ -139,9 +139,21 @@ clutter_offscreen_effect_real_create_texture (ClutterOffscreenEffect *effect, - gfloat width, - gfloat height) - { -- return cogl_texture_new_with_size (MAX (width, 1), MAX (height, 1), -- COGL_TEXTURE_NO_SLICING, -- COGL_PIXEL_FORMAT_RGBA_8888_PRE); -+ CoglError *error = NULL; -+ CoglHandle texture = cogl_texture_new_with_size (MAX (width, 1), MAX (height, 1), -+ COGL_TEXTURE_NO_SLICING, -+ COGL_PIXEL_FORMAT_RGBA_8888_PRE); -+ -+ if (!cogl_texture_allocate (texture, &error)) -+ { -+#if CLUTTER_ENABLE_DEBUG -+ g_warning ("Unable to allocate texture for offscreen effect: %s", error->message); -+#endif /* CLUTTER_ENABLE_DEBUG */ -+ cogl_error_free (error); -+ return NULL; -+ } -+ -+ return texture; - } - - static gboolean --- -2.1.0 - diff --git a/SOURCES/0001-clutter-text-prevent-reset-of-user-set-font-descript.patch b/SOURCES/0001-clutter-text-prevent-reset-of-user-set-font-descript.patch deleted file mode 100644 index 1d76fe9..0000000 --- a/SOURCES/0001-clutter-text-prevent-reset-of-user-set-font-descript.patch +++ /dev/null @@ -1,66 +0,0 @@ -From fa933b5ec52d5ade2ca8eddefbd2de35d941c385 Mon Sep 17 00:00:00 2001 -From: Lionel Landwerlin -Date: Tue, 11 Jun 2013 14:01:30 +0100 -Subject: [PATCH] clutter-text: prevent reset of user set font descriptions on - dpi changes - -When setting the font using clutter_text_set_font_description(), the -font settings on a ClutterText actor can be reset when there is a dpi -changes signaled by the backend. - -https://bugzilla.gnome.org/show_bug.cgi?id=702016 ---- - clutter/clutter-text.c | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c -index e0901cd..7b83ad6 100644 ---- a/clutter/clutter-text.c -+++ b/clutter/clutter-text.c -@@ -568,10 +568,13 @@ clutter_text_dirty_cache (ClutterText *text) - */ - static inline void - clutter_text_set_font_description_internal (ClutterText *self, -- PangoFontDescription *desc) -+ PangoFontDescription *desc, -+ gboolean is_default_font) - { - ClutterTextPrivate *priv = self->priv; - -+ priv->is_default_font = is_default_font; -+ - if (priv->font_desc == desc || - pango_font_description_equal (priv->font_desc, desc)) - return; -@@ -619,7 +622,7 @@ clutter_text_settings_changed_cb (ClutterText *text) - font_name); - - font_desc = pango_font_description_from_string (font_name); -- clutter_text_set_font_description_internal (text, font_desc); -+ clutter_text_set_font_description_internal (text, font_desc, TRUE); - - pango_font_description_free (font_desc); - g_free (font_name); -@@ -4945,7 +4948,8 @@ clutter_text_set_font_description (ClutterText *self, - { - g_return_if_fail (CLUTTER_IS_TEXT (self)); - -- clutter_text_set_font_description_internal (self, font_desc); -+ clutter_text_set_font_description_internal (self, font_desc, -+ font_desc == NULL); - } - - /** -@@ -5052,8 +5056,7 @@ clutter_text_set_font_name (ClutterText *self, - } - - /* this will set the font_name field as well */ -- clutter_text_set_font_description_internal (self, desc); -- priv->is_default_font = is_default_font; -+ clutter_text_set_font_description_internal (self, desc, is_default_font); - - g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_FONT_NAME]); - --- -1.8.3.1 - diff --git a/SOURCES/0001-gesture-action-fix-memory-corruption.patch b/SOURCES/0001-gesture-action-fix-memory-corruption.patch deleted file mode 100644 index ad54924..0000000 --- a/SOURCES/0001-gesture-action-fix-memory-corruption.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 27fdd41e4aa8ae1c5e6a4be92a273381fac0c594 Mon Sep 17 00:00:00 2001 -From: Lionel Landwerlin -Date: Tue, 15 Oct 2013 18:23:46 +0100 -Subject: [PATCH] gesture-action: fix memory corruption - -abcf1d589f29ba7914d5648bb9814ad26c13cd83 introduced a crasher because -the 'point' variable points to a piece of memory that is being -reallocated by the begin_gesture (by a g_array_set_size) call 5 lines -before. - -https://bugzilla.gnome.org/show_bug.cgi?id=710227 ---- - clutter/clutter-gesture-action.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/clutter/clutter-gesture-action.c b/clutter/clutter-gesture-action.c -index 2846227..975c5a4 100644 ---- a/clutter/clutter-gesture-action.c -+++ b/clutter/clutter-gesture-action.c -@@ -359,65 +359,69 @@ stage_captured_event_cb (ClutterActor *stage, - /* we might miss a button-release event in case of grabs, - * so we need to check whether the button is still down - * during a motion event - */ - if (!(mods & CLUTTER_BUTTON1_MASK)) - { - cancel_gesture (action); - return CLUTTER_EVENT_PROPAGATE; - } - } - /* Follow same code path as a touch event update */ - - case CLUTTER_TOUCH_UPDATE: - if (!priv->in_gesture) - { - if (priv->points->len < priv->requested_nb_points) - { - gesture_update_motion_point (point, event); - return CLUTTER_EVENT_PROPAGATE; - } - - /* Wait until the drag threshold has been exceeded - * before starting _TRIGGER_EDGE_AFTER gestures. */ - if (priv->edge == CLUTTER_GESTURE_TRIGGER_EDGE_AFTER && - gesture_point_pass_threshold (point, event)) - { - gesture_update_motion_point (point, event); - return CLUTTER_EVENT_PROPAGATE; - } - -- if (!begin_gesture(action, actor)) -+ if (!begin_gesture (action, actor)) - { -- gesture_update_motion_point (point, event); -+ if ((point = gesture_find_point (action, event, &position)) != NULL) -+ gesture_update_motion_point (point, event); - return CLUTTER_EVENT_PROPAGATE; - } -+ -+ if ((point = gesture_find_point (action, event, &position)) == NULL) -+ return CLUTTER_EVENT_PROPAGATE; - } - - gesture_update_motion_point (point, event); - - g_signal_emit (action, gesture_signals[GESTURE_PROGRESS], 0, actor, - &return_value); - if (!return_value) - { - cancel_gesture (action); - return CLUTTER_EVENT_PROPAGATE; - } - - /* Check if a _TRIGGER_EDGE_BEFORE gesture needs to be cancelled because - * the drag threshold has been exceeded. */ - drag_threshold = gesture_get_threshold (); - if (priv->edge == CLUTTER_GESTURE_TRIGGER_EDGE_BEFORE && - ((fabsf (point->press_y - point->last_motion_y) > drag_threshold) || - (fabsf (point->press_x - point->last_motion_x) > drag_threshold))) - { - cancel_gesture (action); - return CLUTTER_EVENT_PROPAGATE; - } - break; - - case CLUTTER_BUTTON_RELEASE: - case CLUTTER_TOUCH_END: - { - gesture_update_release_point (point, event); - - if (priv->in_gesture && --- -2.3.7 - diff --git a/SOURCES/0001-x11-trap-errors-when-calling-XIQueryDevice.patch b/SOURCES/0001-x11-trap-errors-when-calling-XIQueryDevice.patch deleted file mode 100644 index dac8407..0000000 --- a/SOURCES/0001-x11-trap-errors-when-calling-XIQueryDevice.patch +++ /dev/null @@ -1,70 +0,0 @@ -From d343cc6289583a7b0d929b82b740499ed588b1ab Mon Sep 17 00:00:00 2001 -From: Matthias Clasen -Date: Mon, 10 Jun 2013 21:41:24 -0400 -Subject: [PATCH] x11: trap errors when calling XIQueryDevice - -Devices can disappear at any time, causing XIQueryDevice -to throw an error. At the same time, plug a memory leak. - -https://bugzilla.gnome.org/show_bug.cgi?id=701974 ---- - clutter/x11/clutter-device-manager-xi2.c | 30 ++++++++++++++++++++++-------- - 1 file changed, 22 insertions(+), 8 deletions(-) - -diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c -index 6a06cec..49ee212 100644 ---- a/clutter/x11/clutter-device-manager-xi2.c -+++ b/clutter/x11/clutter-device-manager-xi2.c -@@ -408,10 +408,16 @@ translate_hierarchy_event (ClutterBackendX11 *backend_x11, - - CLUTTER_NOTE (EVENT, "Hierarchy event: device enabled"); - -+ clutter_x11_trap_x_errors (); - info = XIQueryDevice (backend_x11->xdpy, - ev->info[i].deviceid, - &n_devices); -- add_device (manager_xi2, backend_x11, &info[0], FALSE); -+ clutter_x11_untrap_x_errors (); -+ if (info != NULL) -+ { -+ add_device (manager_xi2, backend_x11, &info[0], FALSE); -+ XIFreeDeviceInfo (info); -+ } - } - else if (ev->info[i].flags & XIDeviceDisabled) - { -@@ -448,16 +454,24 @@ translate_hierarchy_event (ClutterBackendX11 *backend_x11, - /* and attach the slave to the new master if needed */ - if (ev->info[i].flags & XISlaveAttached) - { -+ clutter_x11_trap_x_errors (); - info = XIQueryDevice (backend_x11->xdpy, - ev->info[i].deviceid, - &n_devices); -- master = g_hash_table_lookup (manager_xi2->devices_by_id, -- GINT_TO_POINTER (info->attachment)); -- _clutter_input_device_set_associated_device (slave, master); -- _clutter_input_device_add_slave (master, slave); -- -- send_changed = TRUE; -- XIFreeDeviceInfo (info); -+ clutter_x11_untrap_x_errors (); -+ if (info != NULL) -+ { -+ master = g_hash_table_lookup (manager_xi2->devices_by_id, -+ GINT_TO_POINTER (info->attachment)); -+ if (master != NULL) -+ { -+ _clutter_input_device_set_associated_device (slave, master); -+ _clutter_input_device_add_slave (master, slave); -+ -+ send_changed = TRUE; -+ } -+ XIFreeDeviceInfo (info); -+ } - } - - if (send_changed) --- -1.8.3.1 - diff --git a/SOURCES/Allow-setting-up-quad-buffer-stereo-output.patch b/SOURCES/Allow-setting-up-quad-buffer-stereo-output.patch index 20694da..a253cd1 100644 --- a/SOURCES/Allow-setting-up-quad-buffer-stereo-output.patch +++ b/SOURCES/Allow-setting-up-quad-buffer-stereo-output.patch @@ -1,4 +1,4 @@ -From 55f30d3240ad636519e1fcc5a579b7d5cba0ed5f Mon Sep 17 00:00:00 2001 +From d1ee5c340237cb64b18cc4fdef91bc472eb415ef Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Thu, 8 May 2014 18:52:09 -0400 Subject: [PATCH] Allow setting up quad-buffer stereo output @@ -16,15 +16,15 @@ somethign specific to GLX. https://bugzilla.gnome.org/show_bug.cgi?id=732706 --- - clutter/x11/clutter-backend-x11.c | 170 +++++++++++++++++++++++++++++--------- + clutter/x11/clutter-backend-x11.c | 168 +++++++++++++++++++++++++++++--------- clutter/x11/clutter-x11.h | 3 + - 2 files changed, 133 insertions(+), 40 deletions(-) + 2 files changed, 131 insertions(+), 40 deletions(-) diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c -index b7cfcc4..bba21e7 100644 +index c9478c4..14eda35 100644 --- a/clutter/x11/clutter-backend-x11.c +++ b/clutter/x11/clutter-backend-x11.c -@@ -96,6 +96,7 @@ static const gchar *atom_names[] = { +@@ -93,6 +93,7 @@ static const gchar *atom_names[] = { static gboolean _no_xevent_retrieval = FALSE; static gboolean clutter_enable_xinput = TRUE; static gboolean clutter_enable_argb = FALSE; @@ -32,7 +32,7 @@ index b7cfcc4..bba21e7 100644 static Display *_foreign_dpy = NULL; /* options */ -@@ -706,6 +707,59 @@ clutter_backend_x11_get_renderer (ClutterBackend *backend, +@@ -688,6 +689,59 @@ clutter_backend_x11_get_renderer (ClutterBackend *backend, return renderer; } @@ -92,7 +92,7 @@ index b7cfcc4..bba21e7 100644 static CoglDisplay * clutter_backend_x11_get_display (ClutterBackend *backend, CoglRenderer *renderer, -@@ -713,56 +767,38 @@ clutter_backend_x11_get_display (ClutterBackend *backend, +@@ -695,56 +749,38 @@ clutter_backend_x11_get_display (ClutterBackend *backend, GError **error) { CoglOnscreenTemplate *onscreen_template; @@ -171,7 +171,7 @@ index b7cfcc4..bba21e7 100644 cogl_object_unref (onscreen_template); return display; -@@ -1309,6 +1345,60 @@ clutter_x11_get_use_argb_visual (void) +@@ -1303,6 +1339,58 @@ clutter_x11_get_use_argb_visual (void) return clutter_enable_argb; } @@ -195,7 +195,6 @@ index b7cfcc4..bba21e7 100644 + * appear in 3D, it simply enables individual ClutterActors to paint + * different images for the left and and right eye. + * -+ * Since: 1.20 + */ +void +clutter_x11_set_use_stereo_stage (gboolean use_stereo) @@ -221,7 +220,6 @@ index b7cfcc4..bba21e7 100644 + * + * Return value: %TRUE if stereo stages are used if possible + * -+ * Since: 1.20 + */ +gboolean +clutter_x11_get_use_stereo_stage (void) @@ -233,19 +231,19 @@ index b7cfcc4..bba21e7 100644 _clutter_backend_x11_get_visual_info (ClutterBackendX11 *backend_x11) { diff --git a/clutter/x11/clutter-x11.h b/clutter/x11/clutter-x11.h -index 6913280..efcd37e 100644 +index b0ab8a1..4fb2b35 100644 --- a/clutter/x11/clutter-x11.h +++ b/clutter/x11/clutter-x11.h -@@ -137,6 +137,9 @@ gboolean clutter_x11_has_composite_extension (void); - void clutter_x11_set_use_argb_visual (gboolean use_argb); +@@ -156,6 +156,9 @@ void clutter_x11_set_use_argb_visual (gboolean use_argb); + CLUTTER_AVAILABLE_IN_ALL gboolean clutter_x11_get_use_argb_visual (void); +void clutter_x11_set_use_stereo_stage (gboolean use_stereo); +gboolean clutter_x11_get_use_stereo_stage (void); + + CLUTTER_AVAILABLE_IN_ALL Time clutter_x11_get_current_event_time (void); - gint clutter_x11_event_get_key_group (const ClutterEvent *event); -- -1.9.3 +2.1.0 diff --git a/SOURCES/Bind-constraints-Don-t-force-redraws-on-source-relay.patch b/SOURCES/Bind-constraints-Don-t-force-redraws-on-source-relay.patch deleted file mode 100644 index 5d63215..0000000 --- a/SOURCES/Bind-constraints-Don-t-force-redraws-on-source-relay.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 0b536c02f97d7adfa8c4af4a4214f02d4ac9f716 Mon Sep 17 00:00:00 2001 -From: "Owen W. Taylor" -Date: Fri, 22 Nov 2013 10:30:21 -0500 -Subject: [PATCH] Bind constraints: Don't force redraws on source relayout - -When the source actor potentially changes size, that shouldn't -necessarily result in the target actor being redrawn - it should -be like when a child of a container is reallocated due to changes -in its siblings or parent - it should redraw only to the extent -that it is moved and resized. Privately export an internal function -from clutter-actor.c to allow getting this right. - -https://bugzilla.gnome.org/show_bug.cgi?id=719367 ---- - clutter/clutter-actor-private.h | 1 + - clutter/clutter-actor.c | 4 +--- - clutter/clutter-bind-constraint.c | 2 +- - clutter/clutter-snap-constraint.c | 2 +- - 4 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/clutter/clutter-actor-private.h b/clutter/clutter-actor-private.h -index 1c6f165..8bcf26c 100644 ---- a/clutter/clutter-actor-private.h -+++ b/clutter/clutter-actor-private.h -@@ -318,6 +318,7 @@ void _clutter_actor_detach_clone - ClutterActor *clone); - void _clutter_actor_queue_redraw_on_clones (ClutterActor *actor); - void _clutter_actor_queue_relayout_on_clones (ClutterActor *actor); -+void _clutter_actor_queue_only_relayout (ClutterActor *actor); - - G_END_DECLS - -diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c -index 4ceb62c..4504ac6 100644 ---- a/clutter/clutter-actor.c -+++ b/clutter/clutter-actor.c -@@ -1037,8 +1037,6 @@ static void clutter_anchor_coord_set_gravity (AnchorCoord *coord - - static gboolean clutter_anchor_coord_is_zero (const AnchorCoord *coord); - --static void _clutter_actor_queue_only_relayout (ClutterActor *self); -- - static void _clutter_actor_get_relative_transformation_matrix (ClutterActor *self, - ClutterActor *ancestor, - CoglMatrix *matrix); -@@ -8862,7 +8860,7 @@ _clutter_actor_queue_redraw_with_clip (ClutterActor *self, - NULL /* effect */); - } - --static void -+void - _clutter_actor_queue_only_relayout (ClutterActor *self) - { - ClutterActorPrivate *priv = self->priv; -diff --git a/clutter/clutter-bind-constraint.c b/clutter/clutter-bind-constraint.c -index b9e45ab..fa94906 100644 ---- a/clutter/clutter-bind-constraint.c -+++ b/clutter/clutter-bind-constraint.c -@@ -151,7 +151,7 @@ source_queue_relayout (ClutterActor *source, - ClutterBindConstraint *bind) - { - if (bind->actor != NULL) -- clutter_actor_queue_relayout (bind->actor); -+ _clutter_actor_queue_only_relayout (bind->actor); - } - - static void -diff --git a/clutter/clutter-snap-constraint.c b/clutter/clutter-snap-constraint.c -index c8eaea9..b4c558f 100644 ---- a/clutter/clutter-snap-constraint.c -+++ b/clutter/clutter-snap-constraint.c -@@ -94,7 +94,7 @@ source_queue_relayout (ClutterActor *source, - ClutterSnapConstraint *constraint) - { - if (constraint->actor != NULL) -- clutter_actor_queue_relayout (constraint->actor); -+ _clutter_actor_queue_only_relayout (constraint->actor); - } - - static void --- -1.8.5.3 - diff --git a/SOURCES/ClutterStageCogl-Ignore-a-clip-the-size-of-the-stage.patch b/SOURCES/ClutterStageCogl-Ignore-a-clip-the-size-of-the-stage.patch deleted file mode 100644 index 6017907..0000000 --- a/SOURCES/ClutterStageCogl-Ignore-a-clip-the-size-of-the-stage.patch +++ /dev/null @@ -1,51 +0,0 @@ -From cbb9d1e0629f4aa2955291a509d3fba6880b73b9 Mon Sep 17 00:00:00 2001 -From: "Owen W. Taylor" -Date: Wed, 4 Dec 2013 23:54:27 -0500 -Subject: [PATCH] ClutterStageCogl: Ignore a clip the size of the stage - -If the clip region includes the entire stage, ignore it - we aren't -actually clipped. - -https://bugzilla.gnome.org/show_bug.cgi?id=719901 ---- - clutter/cogl/clutter-stage-cogl.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/clutter/cogl/clutter-stage-cogl.c b/clutter/cogl/clutter-stage-cogl.c -index 6dc3fab..168c70b 100644 ---- a/clutter/cogl/clutter-stage-cogl.c -+++ b/clutter/cogl/clutter-stage-cogl.c -@@ -398,6 +398,8 @@ static void - clutter_stage_cogl_redraw (ClutterStageWindow *stage_window) - { - ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window); -+ cairo_rectangle_int_t geom; -+ gboolean have_clip; - gboolean may_use_clipped_redraw; - gboolean use_clipped_redraw; - gboolean can_blit_sub_buffer; -@@ -435,11 +437,19 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window) - - has_buffer_age = cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_BUFFER_AGE); - -+ _clutter_stage_window_get_geometry (stage_window, &geom); -+ -+ /* NB: a zero width redraw clip == full stage redraw */ -+ have_clip = (stage_cogl->bounding_redraw_clip.width != 0 && -+ !(stage_cogl->bounding_redraw_clip.x == 0 && -+ stage_cogl->bounding_redraw_clip.y == 0 && -+ stage_cogl->bounding_redraw_clip.width == geom.width && -+ stage_cogl->bounding_redraw_clip.height == geom.height)); -+ - may_use_clipped_redraw = FALSE; - if (_clutter_stage_window_can_clip_redraws (stage_window) && - can_blit_sub_buffer && -- /* NB: a zero width redraw clip == full stage redraw */ -- stage_cogl->bounding_redraw_clip.width != 0 && -+ have_clip && - /* some drivers struggle to get going and produce some junk - * frames when starting up... */ - stage_cogl->frame_count > 3) --- -1.8.5.3 - diff --git a/SOURCES/Don-t-queue-redraws-when-reallocating-actor-that-hav.patch b/SOURCES/Don-t-queue-redraws-when-reallocating-actor-that-hav.patch deleted file mode 100644 index 8201a8d..0000000 --- a/SOURCES/Don-t-queue-redraws-when-reallocating-actor-that-hav.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 2e85269368a815435f107f1b7dfbc15c7e806fa6 Mon Sep 17 00:00:00 2001 -From: "Owen W. Taylor" -Date: Tue, 26 Nov 2013 11:04:27 -0500 -Subject: [PATCH] Don't queue redraws when reallocating actor that haven't - moved - -When support for implicit animation of actor position was added, -the optimization for not queueing when allocating an actor back -to the same location was lost. This optimization is important -since when we are hierarchically allocating down from the top of -the stage we constantly reallocate the actors at the top of the -hierarchy back to the same place. - -https://bugzilla.gnome.org/show_bug.cgi?id=719368 ---- - clutter/clutter-actor.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c -index 4504ac6..b371183 100644 ---- a/clutter/clutter-actor.c -+++ b/clutter/clutter-actor.c -@@ -9738,7 +9738,9 @@ clutter_actor_allocate_internal (ClutterActor *self, - - CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_RELAYOUT); - -- clutter_actor_queue_redraw (self); -+ /* Caller should call clutter_actor_queue_redraw() if needed -+ * for that particular case. -+ */ - } - - /** -@@ -9847,6 +9849,14 @@ clutter_actor_allocate (ClutterActor *self, - return; - } - -+ if (!stage_allocation_changed) -+ { -+ /* If the actor didn't move but needs_allocation is set, we just -+ * need to allocate the children */ -+ clutter_actor_allocate_internal (self, &real_allocation, flags); -+ return; -+ } -+ - /* When ABSOLUTE_ORIGIN_CHANGED is passed in to - * clutter_actor_allocate(), it indicates whether the parent has its - * absolute origin moved; when passed in to ClutterActor::allocate() -@@ -14718,6 +14728,7 @@ clutter_actor_set_animatable_property (ClutterActor *actor, - clutter_actor_allocate_internal (actor, - g_value_get_boxed (value), - actor->priv->allocation_flags); -+ clutter_actor_queue_redraw (actor); - break; - - case PROP_DEPTH: --- -1.8.5.3 - diff --git a/SOURCES/xi2-device-manager-cleanups.patch b/SOURCES/xi2-device-manager-cleanups.patch deleted file mode 100644 index af633df..0000000 --- a/SOURCES/xi2-device-manager-cleanups.patch +++ /dev/null @@ -1,1483 +0,0 @@ -From 5fcfdcb2726637285c256f2b6b8ad75cc619d3a6 Mon Sep 17 00:00:00 2001 -From: "Jasper St. Pierre" -Date: Wed, 10 Jul 2013 16:26:01 -0400 -Subject: [PATCH 1/4] backend-x11: Remove bad branch prediction - -This will only get once, at in Clutter initialization time. - -https://bugzilla.gnome.org/show_bug.cgi?id=703969 ---- - clutter/x11/clutter-backend-x11.c | 105 ++++++++++++++++++-------------------- - 1 file changed, 51 insertions(+), 54 deletions(-) - -diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c -index b7cfcc4..9bbfba8 100644 ---- a/clutter/x11/clutter-backend-x11.c -+++ b/clutter/x11/clutter-backend-x11.c -@@ -222,71 +222,68 @@ clutter_backend_x11_xsettings_notify (const char *name, - static void - clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11) - { -- if (G_UNLIKELY (backend_x11->device_manager == NULL)) -- { -- ClutterEventTranslator *translator; -- ClutterBackend *backend; -+ ClutterEventTranslator *translator; -+ ClutterBackend *backend; - - #if defined(HAVE_XINPUT) || defined(HAVE_XINPUT_2) -- if (clutter_enable_xinput) -+ if (clutter_enable_xinput) -+ { -+ int event_base, first_event, first_error; -+ -+ if (XQueryExtension (backend_x11->xdpy, "XInputExtension", -+ &event_base, -+ &first_event, -+ &first_error)) - { -- int event_base, first_event, first_error; -+#ifdef HAVE_XINPUT_2 -+ int major = 2; -+ int minor = 3; - -- if (XQueryExtension (backend_x11->xdpy, "XInputExtension", -- &event_base, -- &first_event, -- &first_error)) -+ if (XIQueryVersion (backend_x11->xdpy, &major, &minor) != BadRequest) - { --#ifdef HAVE_XINPUT_2 -- int major = 2; -- int minor = 3; -- -- if (XIQueryVersion (backend_x11->xdpy, &major, &minor) != BadRequest) -- { -- CLUTTER_NOTE (BACKEND, "Creating XI2 device manager"); -- backend_x11->has_xinput = TRUE; -- backend_x11->device_manager = -- g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_XI2, -- "backend", backend_x11, -- "opcode", event_base, -- NULL); -- -- backend_x11->xi_minor = minor; -- } -- else -+ CLUTTER_NOTE (BACKEND, "Creating XI2 device manager"); -+ backend_x11->has_xinput = TRUE; -+ backend_x11->device_manager = -+ g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_XI2, -+ "backend", backend_x11, -+ "opcode", event_base, -+ NULL); -+ -+ backend_x11->xi_minor = minor; -+ } -+ else - #endif /* HAVE_XINPUT_2 */ -- { -- CLUTTER_NOTE (BACKEND, "Creating Core+XI device manager"); -- backend_x11->has_xinput = TRUE; -- backend_x11->device_manager = -- g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_X11, -- "backend", backend_x11, -- "event-base", first_event, -- NULL); -- -- backend_x11->xi_minor = -1; -- } -+ { -+ CLUTTER_NOTE (BACKEND, "Creating Core+XI device manager"); -+ backend_x11->has_xinput = TRUE; -+ backend_x11->device_manager = -+ g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_X11, -+ "backend", backend_x11, -+ "event-base", first_event, -+ NULL); -+ -+ backend_x11->xi_minor = -1; - } - } -- else -+ } -+ else - #endif /* HAVE_XINPUT || HAVE_XINPUT_2 */ -- { -- CLUTTER_NOTE (BACKEND, "Creating Core device manager"); -- backend_x11->has_xinput = FALSE; -- backend_x11->device_manager = -- g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_X11, -- "backend", backend_x11, -- NULL); -- -- backend_x11->xi_minor = -1; -- } -- -- backend = CLUTTER_BACKEND (backend_x11); -- backend->device_manager = backend_x11->device_manager; -+ { -+ CLUTTER_NOTE (BACKEND, "Creating Core device manager"); -+ backend_x11->has_xinput = FALSE; -+ backend_x11->device_manager = -+ g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_X11, -+ "backend", backend_x11, -+ NULL); - -- translator = CLUTTER_EVENT_TRANSLATOR (backend_x11->device_manager); -- _clutter_backend_add_event_translator (backend, translator); -+ backend_x11->xi_minor = -1; - } -+ -+ backend = CLUTTER_BACKEND (backend_x11); -+ backend->device_manager = backend_x11->device_manager; -+ -+ translator = CLUTTER_EVENT_TRANSLATOR (backend_x11->device_manager); -+ _clutter_backend_add_event_translator (backend, translator); - } - - static void --- -1.8.4.2 - - -From 3239941d36ae9db92424309f9cdeb3d7f064aa97 Mon Sep 17 00:00:00 2001 -From: "Jasper St. Pierre" -Date: Wed, 10 Jul 2013 16:31:57 -0400 -Subject: [PATCH 2/4] x11: Remove support for XInput 1 - -Now we either use core X11 or XInput 2. - -https://bugzilla.gnome.org/show_bug.cgi?id=703969 - -Conflicts: - clutter/config.h.win32.in ---- - clutter/config.h.win32.in | 3 - - clutter/x11/clutter-backend-x11.c | 31 +-- - clutter/x11/clutter-device-manager-core-x11.c | 230 ---------------- - clutter/x11/clutter-input-device-core-x11.c | 373 -------------------------- - clutter/x11/clutter-input-device-core-x11.h | 5 - - configure.ac | 6 - - 6 files changed, 7 insertions(+), 641 deletions(-) - -diff --git a/clutter/config.h.win32.in b/clutter/config.h.win32.in -index 6040516..e351026 100644 ---- a/clutter/config.h.win32.in -+++ b/clutter/config.h.win32.in -@@ -127,9 +127,6 @@ - /* Define to 1 if X Generic Extensions is available */ - /* #undef HAVE_XGE */ - --/* Define to 1 if XInput is available */ --/* #undef HAVE_XINPUT */ -- - /* Define to 1 if XI2 is available */ - /* #undef HAVE_XINPUT_2 */ - -diff --git a/clutter/x11/clutter-backend-x11.c b/clutter/x11/clutter-backend-x11.c -index 9bbfba8..435370c 100644 ---- a/clutter/x11/clutter-backend-x11.c -+++ b/clutter/x11/clutter-backend-x11.c -@@ -50,10 +50,6 @@ - #include - #endif - --#if HAVE_XINPUT --#include --#endif -- - #if HAVE_XINPUT_2 - #include - #endif -@@ -225,7 +221,7 @@ clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11) - ClutterEventTranslator *translator; - ClutterBackend *backend; - --#if defined(HAVE_XINPUT) || defined(HAVE_XINPUT_2) -+#ifdef HAVE_XINPUT_2 - if (clutter_enable_xinput) - { - int event_base, first_event, first_error; -@@ -235,7 +231,6 @@ clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11) - &first_event, - &first_error)) - { --#ifdef HAVE_XINPUT_2 - int major = 2; - int minor = 3; - -@@ -251,23 +246,11 @@ clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11) - - backend_x11->xi_minor = minor; - } -- else --#endif /* HAVE_XINPUT_2 */ -- { -- CLUTTER_NOTE (BACKEND, "Creating Core+XI device manager"); -- backend_x11->has_xinput = TRUE; -- backend_x11->device_manager = -- g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_X11, -- "backend", backend_x11, -- "event-base", first_event, -- NULL); -- -- backend_x11->xi_minor = -1; -- } - } - } -- else --#endif /* HAVE_XINPUT || HAVE_XINPUT_2 */ -+ -+ if (backend_x11->device_manager == NULL) -+#endif /* HAVE_XINPUT_2 */ - { - CLUTTER_NOTE (BACKEND, "Creating Core device manager"); - backend_x11->has_xinput = FALSE; -@@ -514,14 +497,14 @@ static const GOptionEntry entries[] = - G_OPTION_ARG_NONE, &clutter_synchronise, - N_("Make X calls synchronous"), NULL - }, --#if defined(HAVE_XINPUT) || defined(HAVE_XINPUT_2) -+#ifdef HAVE_XINPUT_2 - { - "disable-xinput", 0, - G_OPTION_FLAG_REVERSE, - G_OPTION_ARG_NONE, &clutter_enable_xinput, - N_("Disable XInput support"), NULL - }, --#endif /* HAVE_XINPUT */ -+#endif /* HAVE_XINPUT_2 */ - { NULL } - }; - -@@ -1188,7 +1171,7 @@ clutter_x11_get_input_devices (void) - gboolean - clutter_x11_has_xinput (void) - { --#if defined(HAVE_XINPUT) || defined(HAVE_XINPUT_2) -+#ifdef HAVE_XINPUT_2 - ClutterBackend *backend = clutter_get_default_backend (); - - if (backend == NULL) -diff --git a/clutter/x11/clutter-device-manager-core-x11.c b/clutter/x11/clutter-device-manager-core-x11.c -index f470189..6a3606d 100644 ---- a/clutter/x11/clutter-device-manager-core-x11.c -+++ b/clutter/x11/clutter-device-manager-core-x11.c -@@ -37,17 +37,6 @@ - #include "clutter-stage-private.h" - #include "clutter-private.h" - --#ifdef HAVE_XINPUT --#include -- --/* old versions of XI.h don't define these */ --#ifndef IsXExtensionKeyboard --#define IsXExtensionKeyboard 3 --#define IsXExtensionPointer 4 --#endif -- --#endif /* HAVE_XINPUT */ -- - enum - { - PROP_0, -@@ -69,146 +58,6 @@ G_DEFINE_TYPE_WITH_CODE (ClutterDeviceManagerX11, - G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_EVENT_TRANSLATOR, - clutter_event_translator_iface_init)); - --#ifdef HAVE_XINPUT --static void --translate_class_info (ClutterInputDevice *device, -- XDeviceInfo *info) --{ -- XAnyClassPtr any_class; -- gint i; -- -- any_class = info->inputclassinfo; -- -- for (i = 0; i < info->num_classes; i++) -- { -- switch (any_class->class) -- { -- case ButtonClass: -- break; -- -- case KeyClass: -- { -- XKeyInfo *xk_info = (XKeyInfo *) any_class; -- ClutterInputDeviceX11 *device_x11; -- guint n_keys; -- -- device_x11 = CLUTTER_INPUT_DEVICE_X11 (device); -- -- n_keys = xk_info->max_keycode - xk_info->min_keycode + 1; -- -- _clutter_input_device_set_n_keys (device, n_keys); -- _clutter_input_device_x11_set_keycodes (device_x11, -- xk_info->min_keycode, -- xk_info->max_keycode); -- } -- break; -- -- case ValuatorClass: -- { -- XValuatorInfo *xv_info = (XValuatorInfo *) any_class; -- gint j; -- -- for (j = 0; j < xv_info->num_axes; j++) -- { -- ClutterInputAxis axis; -- -- switch (j) -- { -- case 0: -- axis = CLUTTER_INPUT_AXIS_X; -- break; -- -- case 1: -- axis = CLUTTER_INPUT_AXIS_Y; -- break; -- -- case 2: -- axis = CLUTTER_INPUT_AXIS_PRESSURE; -- break; -- -- case 3: -- axis = CLUTTER_INPUT_AXIS_XTILT; -- break; -- -- case 4: -- axis = CLUTTER_INPUT_AXIS_YTILT; -- break; -- -- case 5: -- axis = CLUTTER_INPUT_AXIS_WHEEL; -- break; -- -- default: -- axis = CLUTTER_INPUT_AXIS_IGNORE; -- break; -- } -- -- _clutter_input_device_add_axis (device, axis, -- xv_info->axes[j].min_value, -- xv_info->axes[j].max_value, -- xv_info->axes[j].resolution); -- } -- } -- break; -- } -- -- any_class = (XAnyClassPtr) (((char *) any_class) + any_class->length); -- } --} -- --static ClutterInputDevice * --create_device (ClutterDeviceManagerX11 *manager_x11, -- ClutterBackendX11 *backend_x11, -- XDeviceInfo *info) --{ -- ClutterInputDeviceType source; -- ClutterInputDevice *retval; -- -- if (info->use != IsXExtensionPointer && -- info->use != IsXExtensionKeyboard) -- return NULL; -- -- if (info->use == IsXExtensionKeyboard) -- source = CLUTTER_KEYBOARD_DEVICE; -- else -- { -- gchar *name; -- -- name = g_ascii_strdown (info->name, -1); -- -- if (strstr (name, "eraser") != NULL) -- source = CLUTTER_ERASER_DEVICE; -- else if (strstr (name, "cursor") != NULL) -- source = CLUTTER_CURSOR_DEVICE; -- else if (strstr (name, "wacom") != NULL || strstr (name, "pen") != NULL) -- source = CLUTTER_PEN_DEVICE; -- else -- source = CLUTTER_POINTER_DEVICE; -- -- g_free (name); -- } -- -- retval = g_object_new (CLUTTER_TYPE_INPUT_DEVICE_X11, -- "name", info->name, -- "id", info->id, -- "has-cursor", FALSE, -- "device-manager", manager_x11, -- "device-type", source, -- "device-mode", CLUTTER_INPUT_MODE_FLOATING, -- "backend", backend_x11, -- "enabled", FALSE, -- NULL); -- translate_class_info (retval, info); -- -- CLUTTER_NOTE (BACKEND, -- "XI Device '%s' (id: %d) created", -- info->name, -- (int) info->id); -- -- return retval; --} --#endif /* HAVE_XINPUT */ -- - static inline void - translate_key_event (ClutterBackendX11 *backend_x11, - ClutterDeviceManagerX11 *manager_x11, -@@ -275,20 +124,6 @@ out: - return; - } - --#ifdef HAVE_XINPUT --static ClutterInputDevice * --get_device_from_event (ClutterDeviceManagerX11 *manager_x11, -- XEvent *xevent) --{ -- guint32 device_id; -- -- device_id = ((XDeviceButtonEvent *) xevent)->deviceid; -- -- return g_hash_table_lookup (manager_x11->devices_by_id, -- GINT_TO_POINTER (device_id)); --} --#endif /* HAVE_XINPUT */ -- - static ClutterTranslateReturn - clutter_device_manager_x11_translate_event (ClutterEventTranslator *translator, - gpointer native, -@@ -300,9 +135,6 @@ clutter_device_manager_x11_translate_event (ClutterEventTranslator *translator, - ClutterTranslateReturn res; - ClutterStage *stage; - XEvent *xevent; --#ifdef HAVE_XINPUT -- ClutterInputDevice *device; --#endif - - manager_x11 = CLUTTER_DEVICE_MANAGER_X11 (translator); - backend_x11 = CLUTTER_BACKEND_X11 (clutter_get_default_backend ()); -@@ -322,23 +154,6 @@ clutter_device_manager_x11_translate_event (ClutterEventTranslator *translator, - - res = CLUTTER_TRANSLATE_CONTINUE; - --#ifdef HAVE_XINPUT -- device = get_device_from_event (manager_x11, xevent); -- if (device != NULL) -- { -- ClutterInputDeviceX11 *device_x11; -- gboolean retval; -- -- device_x11 = CLUTTER_INPUT_DEVICE_X11 (device); -- retval = _clutter_input_device_x11_translate_xi_event (device_x11, -- stage_x11, -- xevent, -- event); -- if (retval) -- return CLUTTER_TRANSLATE_QUEUE; -- } --#endif /* HAVE_XINPUT */ -- - switch (xevent->type) - { - case KeyPress: -@@ -537,57 +352,12 @@ clutter_device_manager_x11_constructed (GObject *gobject) - { - ClutterDeviceManagerX11 *manager_x11; - ClutterBackendX11 *backend_x11; --#ifdef HAVE_XINPUT -- ClutterDeviceManager *manager; -- XDeviceInfo *x_devices = NULL; -- int i, n_devices; --#endif /* HAVE_XINPUT */ - - manager_x11 = CLUTTER_DEVICE_MANAGER_X11 (gobject); - - g_object_get (gobject, "backend", &backend_x11, NULL); - g_assert (backend_x11 != NULL); - --#ifdef HAVE_XINPUT -- manager = CLUTTER_DEVICE_MANAGER (gobject); -- x_devices = XListInputDevices (backend_x11->xdpy, &n_devices); -- if (n_devices == 0) -- { -- CLUTTER_NOTE (BACKEND, "No XInput devices found"); -- goto default_device; -- } -- -- for (i = 0; i < n_devices; i++) -- { -- XDeviceInfo *info = x_devices + i; -- ClutterInputDevice *device; -- -- CLUTTER_NOTE (BACKEND, -- "Considering device %li with type %d, %d of %d", -- info->id, -- info->use, -- i, n_devices); -- -- device = create_device (manager_x11, backend_x11, info); -- if (device != NULL) -- _clutter_device_manager_add_device (manager, device); -- } -- -- XFreeDeviceList (x_devices); -- --default_device: --#endif /* HAVE_XINPUT */ -- -- /* fallback code in case: -- * -- * - we do not have XInput support compiled in -- * - we do not have the XInput extension -- * -- * we register two default devices, one for the pointer -- * and one for the keyboard. this block must also be -- * executed for the XInput support because XI does not -- * cover core devices -- */ - manager_x11->core_pointer = - g_object_new (CLUTTER_TYPE_INPUT_DEVICE_X11, - "name", "Core Pointer", -diff --git a/clutter/x11/clutter-input-device-core-x11.c b/clutter/x11/clutter-input-device-core-x11.c -index 6c78a30..0835c17 100644 ---- a/clutter/x11/clutter-input-device-core-x11.c -+++ b/clutter/x11/clutter-input-device-core-x11.c -@@ -33,12 +33,6 @@ - #include "clutter-backend-x11.h" - #include "clutter-stage-x11.h" - --#ifdef HAVE_XINPUT --#include --#endif -- --#define MAX_DEVICE_CLASSES 13 -- - typedef struct _ClutterInputDeviceClass ClutterInputDeviceX11Class; - - /* a specific X11 input device */ -@@ -46,22 +40,6 @@ struct _ClutterInputDeviceX11 - { - ClutterInputDevice device; - --#ifdef HAVE_XINPUT -- XDevice *xdevice; -- -- XEventClass event_classes[MAX_DEVICE_CLASSES]; -- int num_classes; -- -- int button_press_type; -- int button_release_type; -- int motion_notify_type; -- int state_notify_type; -- int key_press_type; -- int key_release_type; --#endif /* HAVE_XINPUT */ -- -- gint *axis_data; -- - int min_keycode; - int max_keycode; - }; -@@ -72,134 +50,6 @@ G_DEFINE_TYPE (ClutterInputDeviceX11, - clutter_input_device_x11, - CLUTTER_TYPE_INPUT_DEVICE); - --static void --clutter_input_device_x11_select_stage_events (ClutterInputDevice *device, -- ClutterStage *stage, -- gint event_mask) --{ --#if HAVE_XINPUT -- ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (device->backend); -- ClutterInputDeviceX11 *device_x11; -- ClutterStageX11 *stage_x11; -- XEventClass class; -- gint i; -- -- device_x11 = CLUTTER_INPUT_DEVICE_X11 (device); -- -- stage_x11 = CLUTTER_STAGE_X11 (_clutter_stage_get_window (stage)); -- -- i = 0; -- -- if (event_mask & ButtonPressMask) -- { -- DeviceButtonPress (device_x11->xdevice, -- device_x11->button_press_type, -- class); -- if (class != 0) -- device_x11->event_classes[i++] = class; -- -- DeviceButtonPressGrab (device_x11->xdevice, 0, class); -- if (class != 0) -- device_x11->event_classes[i++] = class; -- } -- -- if (event_mask & ButtonReleaseMask) -- { -- DeviceButtonRelease (device_x11->xdevice, -- device_x11->button_release_type, -- class); -- if (class != 0) -- device_x11->event_classes[i++] = class; -- } -- -- if (event_mask & PointerMotionMask) -- { -- DeviceMotionNotify (device_x11->xdevice, -- device_x11->motion_notify_type, -- class); -- if (class != 0) -- device_x11->event_classes[i++] = class; -- -- DeviceStateNotify (device_x11->xdevice, -- device_x11->state_notify_type, -- class); -- if (class != 0) -- device_x11->event_classes[i++] = class; -- } -- -- if (event_mask & KeyPressMask) -- { -- DeviceKeyPress (device_x11->xdevice, -- device_x11->key_press_type, -- class); -- if (class != 0) -- device_x11->event_classes[i++] = class; -- } -- -- if (event_mask & KeyReleaseMask) -- { -- DeviceKeyRelease (device_x11->xdevice, -- device_x11->key_release_type, -- class); -- if (class != 0) -- device_x11->event_classes[i++] = class; -- } -- -- device_x11->num_classes = i; -- -- XSelectExtensionEvent (backend_x11->xdpy, -- stage_x11->xwin, -- device_x11->event_classes, -- device_x11->num_classes); --#endif /* HAVE_XINPUT */ --} -- --static void --clutter_input_device_x11_dispose (GObject *gobject) --{ -- ClutterInputDeviceX11 *device_x11 = CLUTTER_INPUT_DEVICE_X11 (gobject); -- --#ifdef HAVE_XINPUT -- if (device_x11->xdevice) -- { -- ClutterInputDevice *device = CLUTTER_INPUT_DEVICE (gobject); -- ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (device->backend); -- -- XCloseDevice (backend_x11->xdpy, device_x11->xdevice); -- device_x11->xdevice = NULL; -- } --#endif /* HAVE_XINPUT */ -- -- g_free (device_x11->axis_data); -- -- G_OBJECT_CLASS (clutter_input_device_x11_parent_class)->dispose (gobject); --} -- --static void --clutter_input_device_x11_constructed (GObject *gobject) --{ --#ifdef HAVE_XINPUT -- ClutterInputDeviceX11 *device_x11 = CLUTTER_INPUT_DEVICE_X11 (gobject); -- ClutterInputDevice *device = CLUTTER_INPUT_DEVICE (gobject); -- ClutterBackendX11 *backend_x11; -- -- backend_x11 = CLUTTER_BACKEND_X11 (device->backend); -- -- clutter_x11_trap_x_errors (); -- -- device_x11->xdevice = XOpenDevice (backend_x11->xdpy, device->id); -- -- if (clutter_x11_untrap_x_errors ()) -- { -- g_warning ("Device '%s' cannot be opened", -- clutter_input_device_get_device_name (device)); -- } --#endif /* HAVE_XINPUT */ -- -- if (G_OBJECT_CLASS (clutter_input_device_x11_parent_class)->constructed) -- G_OBJECT_CLASS (clutter_input_device_x11_parent_class)->constructed (gobject); --} -- - static gboolean - clutter_input_device_x11_keycode_to_evdev (ClutterInputDevice *device, - guint hardware_keycode, -@@ -220,10 +70,6 @@ clutter_input_device_x11_class_init (ClutterInputDeviceX11Class *klass) - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - ClutterInputDeviceClass *device_class = CLUTTER_INPUT_DEVICE_CLASS (klass); - -- gobject_class->constructed = clutter_input_device_x11_constructed; -- gobject_class->dispose = clutter_input_device_x11_dispose; -- -- device_class->select_stage_events = clutter_input_device_x11_select_stage_events; - device_class->keycode_to_evdev = clutter_input_device_x11_keycode_to_evdev; - } - -@@ -252,222 +98,3 @@ _clutter_input_device_x11_get_max_keycode (ClutterInputDeviceX11 *device_x11) - { - return device_x11->max_keycode; - } -- --#ifdef HAVE_XINPUT --static void --update_axes (ClutterInputDeviceX11 *device_x11, -- guint n_axes, -- gint first_axis, -- gint *axes_data) --{ -- ClutterInputDevice *device = CLUTTER_INPUT_DEVICE (device_x11); -- gint i; -- -- if (device_x11->axis_data == NULL) -- { -- device_x11->axis_data = -- g_new0 (gint, clutter_input_device_get_n_axes (device)); -- } -- -- for (i = 0; i < n_axes; i++) -- device_x11->axis_data[first_axis + i] = axes_data[i]; --} -- --static gdouble * --translate_axes (ClutterInputDeviceX11 *device_x11, -- ClutterStageX11 *stage_x11, -- gfloat *event_x, -- gfloat *event_y) --{ -- ClutterInputDevice *device = CLUTTER_INPUT_DEVICE (device_x11); -- gint root_x, root_y; -- gint n_axes, i; -- gdouble x, y; -- gdouble *retval; -- -- if (!_clutter_stage_x11_get_root_coords (stage_x11, &root_x, &root_y)) -- return NULL; -- -- x = y = 0.0f; -- n_axes = clutter_input_device_get_n_axes (device); -- -- retval = g_new0 (gdouble, n_axes); -- -- for (i = 0; i < n_axes; i++) -- { -- ClutterInputAxis axis; -- -- axis = clutter_input_device_get_axis (device, i); -- switch (axis) -- { -- case CLUTTER_INPUT_AXIS_X: -- case CLUTTER_INPUT_AXIS_Y: -- _clutter_x11_input_device_translate_screen_coord (device, -- root_x, root_y, -- i, -- device_x11->axis_data[i], -- &retval[i]); -- if (axis == CLUTTER_INPUT_AXIS_X) -- x = retval[i]; -- else if (axis == CLUTTER_INPUT_AXIS_Y) -- y = retval[i]; -- break; -- -- default: -- _clutter_input_device_translate_axis (device, i, -- device_x11->axis_data[i], -- &retval[i]); -- break; -- } -- } -- -- if (event_x) -- *event_x = x; -- -- if (event_y) -- *event_y = y; -- -- return retval; --} -- --/* -- * translate_state: -- * @state: the keyboard state of the core device -- * @device_state: the button state of the device -- * -- * Trivially translates the state and the device state into a -- * single bitmask. -- */ --static guint --translate_state (guint state, -- guint device_state) --{ -- return device_state | (state & 0xff); --} --#endif /* HAVE_XINPUT */ -- --gboolean --_clutter_input_device_x11_translate_xi_event (ClutterInputDeviceX11 *device_x11, -- ClutterStageX11 *stage_x11, -- XEvent *xevent, -- ClutterEvent *event) --{ --#ifdef HAVE_XINPUT -- ClutterInputDevice *device = CLUTTER_INPUT_DEVICE (device_x11); -- -- if ((xevent->type == device_x11->button_press_type) || -- (xevent->type == device_x11->button_release_type)) -- { -- XDeviceButtonEvent *xdbe = (XDeviceButtonEvent *) xevent; -- -- event->button.type = event->type = -- (xdbe->type == device_x11->button_press_type) ? CLUTTER_BUTTON_PRESS -- : CLUTTER_BUTTON_RELEASE; -- event->button.device = device; -- event->button.time = xdbe->time; -- event->button.button = xdbe->button; -- event->button.modifier_state = -- translate_state (xdbe->state, xdbe->device_state); -- -- update_axes (device_x11, -- xdbe->axes_count, -- xdbe->first_axis, -- xdbe->axis_data); -- -- event->button.axes = translate_axes (device_x11, stage_x11, -- &event->button.x, -- &event->button.y); -- -- _clutter_stage_x11_set_user_time (stage_x11, event->button.time); -- -- return TRUE; -- } -- -- if ((xevent->type == device_x11->key_press_type) || -- (xevent->type == device_x11->key_release_type)) -- { -- XDeviceKeyEvent *xdke = (XDeviceKeyEvent *) xevent; -- -- if (xdke->keycode < device_x11->min_keycode || -- xdke->keycode >= device_x11->max_keycode) -- { -- g_warning ("Invalid device key code received: %d", xdke->keycode); -- return FALSE; -- } -- -- clutter_input_device_get_key (device, -- xdke->keycode - device_x11->min_keycode, -- &event->key.keyval, -- &event->key.modifier_state); -- if (event->key.keyval == 0) -- return FALSE; -- -- event->key.type = event->type = -- (xdke->type == device_x11->key_press_type) ? CLUTTER_KEY_PRESS -- : CLUTTER_KEY_RELEASE; -- event->key.time = xdke->time; -- event->key.modifier_state |= -- translate_state (xdke->state, xdke->device_state); -- event->key.device = device; -- --#if 0 -- if ((event->key.keyval >= 0x20) && (event->key.keyval <= 0xff)) -- { -- event->key.unicode = (gunichar) event->key.keyval; -- } --#endif -- -- _clutter_stage_x11_set_user_time (stage_x11, event->key.time); -- -- return TRUE; -- } -- -- if (xevent->type == device_x11->motion_notify_type) -- { -- XDeviceMotionEvent *xdme = (XDeviceMotionEvent *) xevent; -- -- event->motion.type = event->type = CLUTTER_MOTION; -- event->motion.time = xdme->time; -- event->motion.modifier_state = -- translate_state (xdme->state, xdme->device_state); -- event->motion.device = device; -- -- event->motion.axes = -- g_new0 (gdouble, clutter_input_device_get_n_axes (device)); -- -- update_axes (device_x11, -- xdme->axes_count, -- xdme->first_axis, -- xdme->axis_data); -- -- event->motion.axes = translate_axes (device_x11, stage_x11, -- &event->motion.x, -- &event->motion.y); -- -- return TRUE; -- } -- -- if (xevent->type == device_x11->state_notify_type) -- { -- XDeviceStateNotifyEvent *xdse = (XDeviceStateNotifyEvent *) xevent; -- XInputClass *input_class = (XInputClass *) xdse->data; -- gint n_axes = clutter_input_device_get_n_axes (device); -- int i; -- -- for (i = 0; i < xdse->num_classes; i++) -- { -- if (input_class->class == ValuatorClass) -- { -- int *axis_data = ((XValuatorState *) input_class)->valuators; -- -- update_axes (device_x11, n_axes, 0, axis_data); -- } -- -- input_class = -- (XInputClass *)(((char *) input_class) + input_class->length); -- } -- } --#endif /* HAVE_XINPUT */ -- -- return FALSE; --} -diff --git a/clutter/x11/clutter-input-device-core-x11.h b/clutter/x11/clutter-input-device-core-x11.h -index af4ed59..ce6b125 100644 ---- a/clutter/x11/clutter-input-device-core-x11.h -+++ b/clutter/x11/clutter-input-device-core-x11.h -@@ -45,11 +45,6 @@ void _clutter_input_device_x11_set_keycodes (ClutterInputDeviceX11 *device_x11, - int _clutter_input_device_x11_get_min_keycode (ClutterInputDeviceX11 *device_x11); - int _clutter_input_device_x11_get_max_keycode (ClutterInputDeviceX11 *device_x11); - --gboolean _clutter_input_device_x11_translate_xi_event (ClutterInputDeviceX11 *device_x11, -- ClutterStageX11 *stage_x11, -- XEvent *xevent, -- ClutterEvent *event); -- - G_END_DECLS - - #endif /* __CLUTTER_INPUT_DEVICE_X11_H__ */ -diff --git a/configure.ac b/configure.ac -index 8dcbf58..47c32d2 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -717,12 +717,6 @@ AS_IF([test "x$SUPPORT_X11" = "x1"], - AC_DEFINE([HAVE_XINPUT_2], - [1], - [Define to 1 if XI2 is available]) -- ], -- [ -- have_xinput2=no -- AC_DEFINE([HAVE_XINPUT], -- [1], -- [Define to 1 if XInput is available]) - ]) - - clutter_save_LIBS="$LIBS" --- -1.8.4.2 - - -From 97584c62c11057944645fb6efab53bdee16ee20e Mon Sep 17 00:00:00 2001 -From: "Jasper St. Pierre" -Date: Wed, 10 Jul 2013 16:34:48 -0400 -Subject: [PATCH 3/4] device-manager: Don't pass the event mask around - -There's no point in doing this, as we always use a constant event mask. -Simply do what everything else does. - -https://bugzilla.gnome.org/show_bug.cgi?id=703969 ---- - clutter/clutter-device-manager-private.h | 9 +++------ - clutter/clutter-device-manager.c | 5 ++--- - clutter/clutter-input-device.c | 6 ++---- - clutter/x11/clutter-input-device-xi2.c | 30 ++++++++---------------------- - clutter/x11/clutter-stage-x11.c | 26 +++++--------------------- - clutter/x11/clutter-stage-x11.h | 2 +- - 6 files changed, 21 insertions(+), 57 deletions(-) - -diff --git a/clutter/clutter-device-manager-private.h b/clutter/clutter-device-manager-private.h -index 8bc5330..631a776 100644 ---- a/clutter/clutter-device-manager-private.h -+++ b/clutter/clutter-device-manager-private.h -@@ -138,8 +138,7 @@ struct _ClutterInputDeviceClass - GObjectClass parent_class; - - void (* select_stage_events) (ClutterInputDevice *device, -- ClutterStage *stage, -- gint event_mask); -+ ClutterStage *stage); - gboolean (* keycode_to_evdev) (ClutterInputDevice *device, - guint hardware_keycode, - guint *evdev_keycode); -@@ -152,8 +151,7 @@ void _clutter_device_manager_remove_device (ClutterDeviceMa - ClutterInputDevice *device); - void _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager); - void _clutter_device_manager_select_stage_events (ClutterDeviceManager *device_manager, -- ClutterStage *stage, -- gint event_mask); -+ ClutterStage *stage); - ClutterBackend *_clutter_device_manager_get_backend (ClutterDeviceManager *device_manager); - - /* input device */ -@@ -199,8 +197,7 @@ void _clutter_input_device_remove_slave (ClutterInputDev - ClutterInputDevice *slave); - - void _clutter_input_device_select_stage_events (ClutterInputDevice *device, -- ClutterStage *stage, -- gint event_flags); -+ ClutterStage *stage); - - gboolean _clutter_input_device_translate_axis (ClutterInputDevice *device, - guint index_, -diff --git a/clutter/clutter-device-manager.c b/clutter/clutter-device-manager.c -index 2dc67be..c54b3e0 100644 ---- a/clutter/clutter-device-manager.c -+++ b/clutter/clutter-device-manager.c -@@ -308,8 +308,7 @@ clutter_device_manager_get_core_device (ClutterDeviceManager *device_manager, - - void - _clutter_device_manager_select_stage_events (ClutterDeviceManager *device_manager, -- ClutterStage *stage, -- gint event_flags) -+ ClutterStage *stage) - { - ClutterDeviceManagerClass *manager_class; - const GSList *devices, *d; -@@ -324,7 +323,7 @@ _clutter_device_manager_select_stage_events (ClutterDeviceManager *device_manage - ClutterInputDevice *device = d->data; - - if (device->is_enabled) -- _clutter_input_device_select_stage_events (device, stage, event_flags); -+ _clutter_input_device_select_stage_events (device, stage); - } - } - -diff --git a/clutter/clutter-input-device.c b/clutter/clutter-input-device.c -index d222177..48cb40a 100644 ---- a/clutter/clutter-input-device.c -+++ b/clutter/clutter-input-device.c -@@ -1624,7 +1624,6 @@ clutter_input_device_get_associated_device (ClutterInputDevice *device) - * clutter_input_device_select_stage_events: - * @device: a #ClutterInputDevice - * @stage: the #ClutterStage to select events on -- * @event_mask: platform-specific mask of events - * - * Selects input device events on @stage. - * -@@ -1632,14 +1631,13 @@ clutter_input_device_get_associated_device (ClutterInputDevice *device) - */ - void - _clutter_input_device_select_stage_events (ClutterInputDevice *device, -- ClutterStage *stage, -- gint event_mask) -+ ClutterStage *stage) - { - ClutterInputDeviceClass *device_class; - - device_class = CLUTTER_INPUT_DEVICE_GET_CLASS (device); - if (device_class->select_stage_events != NULL) -- device_class->select_stage_events (device, stage, event_mask); -+ device_class->select_stage_events (device, stage); - } - - /** -diff --git a/clutter/x11/clutter-input-device-xi2.c b/clutter/x11/clutter-input-device-xi2.c -index 5923977..cd65b7b 100644 ---- a/clutter/x11/clutter-input-device-xi2.c -+++ b/clutter/x11/clutter-input-device-xi2.c -@@ -55,8 +55,7 @@ G_DEFINE_TYPE (ClutterInputDeviceXI2, - - static void - clutter_input_device_xi2_select_stage_events (ClutterInputDevice *device, -- ClutterStage *stage, -- gint event_mask) -+ ClutterStage *stage) - { - ClutterInputDeviceXI2 *device_xi2 = CLUTTER_INPUT_DEVICE_XI2 (device); - ClutterBackendX11 *backend_x11; -@@ -71,26 +70,13 @@ clutter_input_device_xi2_select_stage_events (ClutterInputDevice *device, - len = XIMaskLen (XI_LASTEVENT); - mask = g_new0 (unsigned char, len); - -- if (event_mask & PointerMotionMask) -- XISetMask (mask, XI_Motion); -- -- if (event_mask & ButtonPressMask) -- XISetMask (mask, XI_ButtonPress); -- -- if (event_mask & ButtonReleaseMask) -- XISetMask (mask, XI_ButtonRelease); -- -- if (event_mask & KeyPressMask) -- XISetMask (mask, XI_KeyPress); -- -- if (event_mask & KeyReleaseMask) -- XISetMask (mask, XI_KeyRelease); -- -- if (event_mask & EnterWindowMask) -- XISetMask (mask, XI_Enter); -- -- if (event_mask & LeaveWindowMask) -- XISetMask (mask, XI_Leave); -+ XISetMask (mask, XI_Motion); -+ XISetMask (mask, XI_ButtonPress); -+ XISetMask (mask, XI_ButtonRelease); -+ XISetMask (mask, XI_KeyPress); -+ XISetMask (mask, XI_KeyRelease); -+ XISetMask (mask, XI_Enter); -+ XISetMask (mask, XI_Leave); - - #ifdef HAVE_XINPUT_2_2 - /* enable touch event support if we're running on XInput 2.2 */ -diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c -index 230172c..08b8e15 100644 ---- a/clutter/x11/clutter-stage-x11.c -+++ b/clutter/x11/clutter-stage-x11.c -@@ -547,14 +547,10 @@ _clutter_stage_x11_events_device_changed (ClutterStageX11 *stage_x11, - ClutterDeviceManager *device_manager) - { - ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11); -- int event_flags = 0; - - if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_FLOATING) -- event_flags = CLUTTER_STAGE_X11_EVENT_MASK; -- -- _clutter_device_manager_select_stage_events (device_manager, -- stage_cogl->wrapper, -- event_flags); -+ _clutter_device_manager_select_stage_events (device_manager, -+ stage_cogl->wrapper); - } - - static void -@@ -564,12 +560,10 @@ stage_events_device_added (ClutterDeviceManager *device_manager, - { - ClutterStageWindow *stage_window = user_data; - ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window); -- int event_flags = CLUTTER_STAGE_X11_EVENT_MASK; - - if (clutter_input_device_get_device_mode (device) == CLUTTER_INPUT_MODE_FLOATING) - _clutter_device_manager_select_stage_events (device_manager, -- stage_cogl->wrapper, -- event_flags); -+ stage_cogl->wrapper); - } - - static gboolean -@@ -580,7 +574,6 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window) - ClutterBackend *backend = CLUTTER_BACKEND (stage_cogl->backend); - ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend); - ClutterDeviceManager *device_manager; -- int event_flags; - gfloat width, height; - - clutter_actor_get_size (CLUTTER_ACTOR (stage_cogl->wrapper), -@@ -623,14 +616,6 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window) - set_wm_title (stage_x11); - set_cursor_visible (stage_x11); - -- -- /* the masks for the events we want to select on a stage window; -- * KeyPressMask and KeyReleaseMask are necessary even with XI1 -- * because key events are broken with that extension, and will -- * be fixed by XI2 -- */ -- event_flags = CLUTTER_STAGE_X11_EVENT_MASK; -- - /* we unconditionally select input events even with event retrieval - * disabled because we need to guarantee that the Clutter internal - * state is maintained when calling clutter_x11_handle_event() without -@@ -648,7 +633,7 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window) - * for an example of things that break if we do conditional event - * selection. - */ -- XSelectInput (backend_x11->xdpy, stage_x11->xwin, event_flags); -+ XSelectInput (backend_x11->xdpy, stage_x11->xwin, CLUTTER_STAGE_X11_EVENT_MASK); - - /* input events also depent on the actual device, so we need to - * use the device manager to let every device select them, using -@@ -658,8 +643,7 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window) - if (G_UNLIKELY (device_manager != NULL)) - { - _clutter_device_manager_select_stage_events (device_manager, -- stage_cogl->wrapper, -- event_flags); -+ stage_cogl->wrapper); - - g_signal_connect (device_manager, "device-added", - G_CALLBACK (stage_events_device_added), -diff --git a/clutter/x11/clutter-stage-x11.h b/clutter/x11/clutter-stage-x11.h -index c7a7a1b..8b61056 100644 ---- a/clutter/x11/clutter-stage-x11.h -+++ b/clutter/x11/clutter-stage-x11.h -@@ -86,7 +86,7 @@ struct _ClutterStageX11Class - KeyReleaseMask | \ - ButtonPressMask | \ - ButtonReleaseMask | \ -- PointerMotionMask; -+ PointerMotionMask - - GType _clutter_stage_x11_get_type (void) G_GNUC_CONST; - --- -1.8.4.2 - - -From 95eb3eb5759644d671fab54142f1a43c3cd1c48e Mon Sep 17 00:00:00 2001 -From: "Jasper St. Pierre" -Date: Wed, 10 Jul 2013 16:53:26 -0400 -Subject: [PATCH 4/4] device-manager: Select for events on XIAllMasterDevices - -This removes a bit of work that we have to do for every device, and makes it -easy for mutter to patch out parts of the event mask it doesn't want. - -https://bugzilla.gnome.org/show_bug.cgi?id=703969 ---- - clutter/clutter-device-manager-private.h | 5 ---- - clutter/clutter-device-manager.c | 12 ++------ - clutter/clutter-device-manager.h | 4 ++- - clutter/clutter-input-device.c | 20 ------------- - clutter/x11/clutter-device-manager-xi2.c | 44 +++++++++++++++++++++++++++++ - clutter/x11/clutter-input-device-xi2.c | 48 -------------------------------- - 6 files changed, 49 insertions(+), 84 deletions(-) - -diff --git a/clutter/clutter-device-manager-private.h b/clutter/clutter-device-manager-private.h -index 631a776..826b2f6 100644 ---- a/clutter/clutter-device-manager-private.h -+++ b/clutter/clutter-device-manager-private.h -@@ -137,8 +137,6 @@ struct _ClutterInputDeviceClass - { - GObjectClass parent_class; - -- void (* select_stage_events) (ClutterInputDevice *device, -- ClutterStage *stage); - gboolean (* keycode_to_evdev) (ClutterInputDevice *device, - guint hardware_keycode, - guint *evdev_keycode); -@@ -196,9 +194,6 @@ void _clutter_input_device_add_slave (ClutterInputDev - void _clutter_input_device_remove_slave (ClutterInputDevice *master, - ClutterInputDevice *slave); - --void _clutter_input_device_select_stage_events (ClutterInputDevice *device, -- ClutterStage *stage); -- - gboolean _clutter_input_device_translate_axis (ClutterInputDevice *device, - guint index_, - gdouble value, -diff --git a/clutter/clutter-device-manager.c b/clutter/clutter-device-manager.c -index c54b3e0..fde30ea 100644 ---- a/clutter/clutter-device-manager.c -+++ b/clutter/clutter-device-manager.c -@@ -311,20 +311,12 @@ _clutter_device_manager_select_stage_events (ClutterDeviceManager *device_manage - ClutterStage *stage) - { - ClutterDeviceManagerClass *manager_class; -- const GSList *devices, *d; - - g_return_if_fail (CLUTTER_IS_DEVICE_MANAGER (device_manager)); - - manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager); -- devices = manager_class->get_devices (device_manager); -- -- for (d = devices; d != NULL; d = d->next) -- { -- ClutterInputDevice *device = d->data; -- -- if (device->is_enabled) -- _clutter_input_device_select_stage_events (device, stage); -- } -+ if (manager_class->select_stage_events) -+ manager_class->select_stage_events (device_manager, stage); - } - - /* -diff --git a/clutter/clutter-device-manager.h b/clutter/clutter-device-manager.h -index 94cde3d..49b0f94 100644 ---- a/clutter/clutter-device-manager.h -+++ b/clutter/clutter-device-manager.h -@@ -81,9 +81,11 @@ struct _ClutterDeviceManagerClass - ClutterInputDevice *device); - void (* remove_device) (ClutterDeviceManager *manager, - ClutterInputDevice *device); -+ void (* select_stage_events) (ClutterDeviceManager *manager, -+ ClutterStage *stage); - - /* padding */ -- gpointer _padding[8]; -+ gpointer _padding[7]; - }; - - -diff --git a/clutter/clutter-input-device.c b/clutter/clutter-input-device.c -index 48cb40a..6aed92b 100644 ---- a/clutter/clutter-input-device.c -+++ b/clutter/clutter-input-device.c -@@ -1620,26 +1620,6 @@ clutter_input_device_get_associated_device (ClutterInputDevice *device) - return device->associated; - } - --/*< internal > -- * clutter_input_device_select_stage_events: -- * @device: a #ClutterInputDevice -- * @stage: the #ClutterStage to select events on -- * -- * Selects input device events on @stage. -- * -- * The implementation of this function depends on the backend used. -- */ --void --_clutter_input_device_select_stage_events (ClutterInputDevice *device, -- ClutterStage *stage) --{ -- ClutterInputDeviceClass *device_class; -- -- device_class = CLUTTER_INPUT_DEVICE_GET_CLASS (device); -- if (device_class->select_stage_events != NULL) -- device_class->select_stage_events (device, stage); --} -- - /** - * clutter_input_device_keycode_to_evdev: - * @device: A #ClutterInputDevice -diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c -index 49ee212..e5664d8 100644 ---- a/clutter/x11/clutter-device-manager-xi2.c -+++ b/clutter/x11/clutter-device-manager-xi2.c -@@ -688,6 +688,49 @@ scroll_valuators_changed (ClutterInputDevice *device, - return retval; - } - -+static void -+clutter_device_manager_xi2_select_stage_events (ClutterDeviceManager *manager, -+ ClutterStage *stage) -+{ -+ ClutterBackendX11 *backend_x11; -+ ClutterStageX11 *stage_x11; -+ XIEventMask xi_event_mask; -+ unsigned char *mask; -+ int len; -+ -+ backend_x11 = CLUTTER_BACKEND_X11 (clutter_get_default_backend ()); -+ stage_x11 = CLUTTER_STAGE_X11 (_clutter_stage_get_window (stage)); -+ -+ len = XIMaskLen (XI_LASTEVENT); -+ mask = g_new0 (unsigned char, len); -+ -+ XISetMask (mask, XI_Motion); -+ XISetMask (mask, XI_ButtonPress); -+ XISetMask (mask, XI_ButtonRelease); -+ XISetMask (mask, XI_KeyPress); -+ XISetMask (mask, XI_KeyRelease); -+ XISetMask (mask, XI_Enter); -+ XISetMask (mask, XI_Leave); -+ -+#ifdef HAVE_XINPUT_2_2 -+ /* enable touch event support if we're running on XInput 2.2 */ -+ if (backend_x11->xi_minor >= 2) -+ { -+ XISetMask (mask, XI_TouchBegin); -+ XISetMask (mask, XI_TouchUpdate); -+ XISetMask (mask, XI_TouchEnd); -+ } -+#endif /* HAVE_XINPUT_2_2 */ -+ -+ xi_event_mask.deviceid = XIAllMasterDevices; -+ xi_event_mask.mask = mask; -+ xi_event_mask.mask_len = len; -+ -+ XISelectEvents (backend_x11->xdpy, stage_x11->xwin, &xi_event_mask, 1); -+ -+ g_free (mask); -+} -+ - static ClutterTranslateReturn - clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator, - gpointer native, -@@ -1483,6 +1526,7 @@ clutter_device_manager_xi2_class_init (ClutterDeviceManagerXI2Class *klass) - manager_class->get_devices = clutter_device_manager_xi2_get_devices; - manager_class->get_core_device = clutter_device_manager_xi2_get_core_device; - manager_class->get_device = clutter_device_manager_xi2_get_device; -+ manager_class->select_stage_events = clutter_device_manager_xi2_select_stage_events; - } - - static void -diff --git a/clutter/x11/clutter-input-device-xi2.c b/clutter/x11/clutter-input-device-xi2.c -index cd65b7b..b9e27a5 100644 ---- a/clutter/x11/clutter-input-device-xi2.c -+++ b/clutter/x11/clutter-input-device-xi2.c -@@ -54,53 +54,6 @@ G_DEFINE_TYPE (ClutterInputDeviceXI2, - CLUTTER_TYPE_INPUT_DEVICE); - - static void --clutter_input_device_xi2_select_stage_events (ClutterInputDevice *device, -- ClutterStage *stage) --{ -- ClutterInputDeviceXI2 *device_xi2 = CLUTTER_INPUT_DEVICE_XI2 (device); -- ClutterBackendX11 *backend_x11; -- ClutterStageX11 *stage_x11; -- XIEventMask xi_event_mask; -- unsigned char *mask; -- int len; -- -- backend_x11 = CLUTTER_BACKEND_X11 (device->backend); -- stage_x11 = CLUTTER_STAGE_X11 (_clutter_stage_get_window (stage)); -- -- len = XIMaskLen (XI_LASTEVENT); -- mask = g_new0 (unsigned char, len); -- -- XISetMask (mask, XI_Motion); -- XISetMask (mask, XI_ButtonPress); -- XISetMask (mask, XI_ButtonRelease); -- XISetMask (mask, XI_KeyPress); -- XISetMask (mask, XI_KeyRelease); -- XISetMask (mask, XI_Enter); -- XISetMask (mask, XI_Leave); -- --#ifdef HAVE_XINPUT_2_2 -- /* enable touch event support if we're running on XInput 2.2 */ -- if (backend_x11->xi_minor >= 2) -- { -- XISetMask (mask, XI_TouchBegin); -- XISetMask (mask, XI_TouchUpdate); -- XISetMask (mask, XI_TouchEnd); -- } --#endif /* HAVE_XINPUT_2_2 */ -- -- xi_event_mask.deviceid = device_xi2->device_id; -- xi_event_mask.mask = mask; -- xi_event_mask.mask_len = len; -- -- CLUTTER_NOTE (BACKEND, "Selecting device id '%d' events", -- device_xi2->device_id); -- -- XISelectEvents (backend_x11->xdpy, stage_x11->xwin, &xi_event_mask, 1); -- -- g_free (mask); --} -- --static void - clutter_input_device_xi2_constructed (GObject *gobject) - { - ClutterInputDeviceXI2 *device_xi2 = CLUTTER_INPUT_DEVICE_XI2 (gobject); -@@ -133,7 +86,6 @@ clutter_input_device_xi2_class_init (ClutterInputDeviceXI2Class *klass) - - gobject_class->constructed = clutter_input_device_xi2_constructed; - -- device_class->select_stage_events = clutter_input_device_xi2_select_stage_events; - device_class->keycode_to_evdev = clutter_input_device_xi2_keycode_to_evdev; - } - --- -1.8.4.2 - diff --git a/SPECS/clutter.spec b/SPECS/clutter.spec index ca8f06a..5b005a7 100644 --- a/SPECS/clutter.spec +++ b/SPECS/clutter.spec @@ -1,62 +1,43 @@ %global _changelog_trimtime %(date +%s -d "1 year ago") +%if 0%{?fedora} +%global with_wayland 1 +%endif + +%global with_tests 1 + Name: clutter -Version: 1.14.4 -Release: 12%{?dist}.1 +Version: 1.20.0 +Release: 4%{?dist} Summary: Open Source software library for creating rich graphical user interfaces Group: Development/Libraries License: LGPLv2+ URL: http://www.clutter-project.org/ -Source0: http://download.gnome.org/sources/clutter/1.14/clutter-%{version}.tar.xz -# https://bugzilla.gnome.org/show_bug.cgi?id=692706 -Patch0: 0001-cally-Use-a-weak-pointer-to-hold-the-key-focus-in-Ca.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=701974 -Patch1: 0001-x11-trap-errors-when-calling-XIQueryDevice.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=1039137 -Patch2: 0001-clutter-text-prevent-reset-of-user-set-font-descript.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=703969 -Patch3: xi2-device-manager-cleanups.patch - -# https://bugzilla.gnome.org/show_bug.cgi?id=719367 -Patch4: Bind-constraints-Don-t-force-redraws-on-source-relay.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=719368 -Patch5: Don-t-queue-redraws-when-reallocating-actor-that-hav.patch -# https://bugzilla.gnome.org/show_bug.cgi?id=719901 -Patch6: ClutterStageCogl-Ignore-a-clip-the-size-of-the-stage.patch +Source0: http://download.gnome.org/sources/clutter/1.20/clutter-%{version}.tar.xz # https://bugzilla.gnome.org/show_bug.cgi?id=732706 Patch7: Allow-setting-up-quad-buffer-stereo-output.patch -# https://bugzilla.redhat.com/show_bug.cgi?id=975171 -Patch8: 0001-clutter-offscreen-effect-Allocate-the-cogl-texture-d.patch - -# CVE-2015-3213 - https://bugzilla.redhat.com/show_bug.cgi?id=1227103 -Patch9: 0001-gesture-action-fix-memory-corruption.patch - -%define cogl_version 1.14.0-6 BuildRequires: glib2-devel mesa-libGL-devel pkgconfig pango-devel BuildRequires: cairo-gobject-devel gdk-pixbuf2-devel atk-devel -BuildRequires: cogl-devel >= %{cogl_version} +BuildRequires: cogl-devel >= 1.15.1 BuildRequires: gobject-introspection-devel >= 0.9.6 BuildRequires: gtk3-devel BuildRequires: json-glib-devel >= 0.12.0 BuildRequires: libXcomposite-devel BuildRequires: libXdamage-devel BuildRequires: libXi-devel +BuildRequires: gettext-devel +%if 0%{?with_wayland} +BuildRequires: libgudev1-devel +BuildRequires: libwayland-client-devel +BuildRequires: libwayland-cursor-devel +BuildRequires: libwayland-server-devel +BuildRequires: libxkbcommon-devel +BuildRequires: libinput-devel +%endif + Requires: gobject-introspection -Requires: cogl >= %{cogl_version} - -# F18 -Obsoletes: clutter-gtk010 < 0.11.4-9 -Obsoletes: clutter-gtk010-devel < 0.11.4-9 -Obsoletes: clutter-sharp < 0-0.17 -Obsoletes: clutter-sharp-devel < 0-0.17 -Obsoletes: pyclutter < 1.3.2-13 -Obsoletes: pyclutter-devel < 1.3.2-13 -Obsoletes: pyclutter-gst < 1.0.0-10 -Obsoletes: pyclutter-gst-devel < 1.0.0-10 -Obsoletes: pyclutter-gtk < 0.10.0-14 -Obsoletes: pyclutter-gtk-devel < 0.10.0-14 %description Clutter is an open source software library for creating fast, @@ -67,10 +48,7 @@ We hope however it can be used for a lot more. %package devel Summary: Clutter development environment Group: Development/Libraries -Requires: %{name} = %{version}-%{release} -Requires: pkgconfig glib2-devel pango-devel fontconfig-devel -Requires: mesa-libGL-devel -Requires: gobject-introspection-devel +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files and libraries for building a extension library for the @@ -89,29 +67,33 @@ We hope however it can be used for a lot more. This package contains documentation for clutter. +%if 0%{?with_tests} +%package tests +Summary: Tests for the clutter package +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description tests +The clutter-tests package contains tests that can be used to verify +the functionality of the installed clutter package. +%endif + %prep %setup -q -%patch0 -p1 -b .cally_crash -%patch1 -p1 -b .xi2-crash -%patch2 -p1 -b .font-switch -%patch3 -p1 -b .xi2-device-manager-cleanups -%patch4 -p1 -b .bind-contraints -%patch5 -p1 -b .unmoved-actors -%patch6 -p1 -b .stage-sized-clip %patch7 -p1 -b .quadbuffer-stereo -%patch8 -p1 -b .allocate-offscreen-effect-texture -%patch9 -p1 -b .CVE-2015-3213 %build -(autoreconf; - %configure $CONFIGFLAGS \ - --enable-xinput - # clutter git ships with some magic to put the git log in shipped tarballs - # which gets listed in files; don't blow up if it's missing - if ! test -f ChangeLog; then - echo "Created from snapshot" > ChangeLog - fi -) +autoreconf +%configure \ + --enable-xinput \ + --enable-gdk-backend \ + %{?with_tests:--enable-installed-tests} \ +%if 0%{?with_wayland} + --enable-egl-backend \ + --enable-evdev-input \ + --enable-wayland-backend \ + --enable-wayland-compositor \ +%endif make %{?_smp_mflags} V=1 @@ -119,10 +101,13 @@ make %{?_smp_mflags} V=1 make install DESTDIR=%{buildroot} INSTALL='install -p' #Remove libtool archives. -find %{buildroot} -name '*.la' -exec rm -f {} ';' +find %{buildroot} -name '*.la' -delete %find_lang clutter-1.0 +%check +make check %{?_smp_mflags} V=1 + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -134,7 +119,6 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_libdir}/girepository-1.0/*.typelib %files devel -%doc ChangeLog %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc @@ -144,40 +128,129 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_datadir}/gtk-doc/html/clutter %{_datadir}/gtk-doc/html/cally +%if 0%{?with_tests} +%files tests +%{_libexecdir}/installed-tests/clutter +%{_datadir}/installed-tests +%endif + %changelog -* Tue Jun 02 2015 Ray Strode 1.14.4-12.1 -- Fix crash when doing gestures at unlock screen - Resolves: rhbz#1227103 +* Fri Jul 17 2015 Florian Müllner - 1.20.0-4 +- Rebuild with update gobject-introspection + Resolves: #1236735 + +* Tue Oct 28 2014 Richard Hughes - 1.20.0-3 +- Fix compile when not using Wayland, harder. + +* Tue Oct 28 2014 Richard Hughes - 1.20.0-2 +- Fix compile when not using Wayland. + +* Mon Sep 22 2014 Kalev Lember - 1.20.0-1 +- Update to 1.20.0 + +* Wed Sep 17 2014 Kalev Lember - 1.19.10-1 +- Update to 1.19.10 + +* Fri Sep 12 2014 Peter Hutterer - 1.19.8-2 +- Rebuild for libinput soname bump + +* Thu Aug 21 2014 Kalev Lember - 1.19.8-1 +- Update to 1.19.8 + +* Wed Aug 20 2014 Kalev Lember - 1.19.6-3 +- Backport an upstream patch for setting xkb layout index + +* Sat Aug 16 2014 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Jul 24 2014 Kalev Lember - 1.19.6-1 +- Update to 1.19.6 + +* Tue Jul 22 2014 Kalev Lember - 1.19.4-4 +- Rebuilt for gobject-introspection 1.41.4 + +* Fri Jul 11 2014 Peter Robinson 1.19.4-2 +- Enable make check +- Build installed tests (thanks Vadim Rutkovsky) RHBZ 1117375 +- Drop old obsoletes + +* Wed Jun 25 2014 Richard Hughes - 1.19.4-1 +- Update to 1.19.4 + +* Sat Jun 07 2014 Fedora Release Engineering - 1.19.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 29 2014 Florian Müllner - 1.19.2-1 +- Update to 1.19.2 + +* Tue Apr 15 2014 Kalev Lember - 1.18.2-1 +- Update to 1.18.2 + +* Wed Mar 19 2014 Florian Müllner - 1.18.0-1 +- Update to 1.18.0 + +* Tue Mar 04 2014 Richard Hughes - 1.17.6-1 +- Update to 1.17.6 + +* Wed Feb 19 2014 Richard Hughes - 1.17.4-1 +- Update to 1.17.4 + +* Sun Feb 09 2014 Peter Hutterer - 1.17.2-2 +- Rebuild for libevdev soname bump + +* Wed Feb 05 2014 Richard Hughes - 1.17.2-1 +- Update to 1.17.2 + +* Wed Jan 29 2014 Richard Hughes - 1.16.4-1 +- Update to 1.16.4 + +* Thu Dec 26 2013 Adam Williamson - 1.16.2-4 +- backport upstream patch to stop using deprecated libevdev functions + +* Mon Dec 9 2013 Matthias Clasen - 1.16.2-3 +- A followup fix to the previous changes + +* Tue Nov 26 2013 Matthias Clasen - 1.16.2-2 +- Avoid excessive redraws when windows are moved in gnome-shell + +* Thu Nov 21 2013 Richard Hughes - 1.16.2-1 +- Update to 1.16.2 + +* Mon Oct 07 2013 Adam Jackson 1.16.0-2 +- Fix touchpads to not warp to bizarre places on initial touch. + +* Tue Sep 24 2013 Kalev Lember - 1.16.0-1 +- Update to 1.16.0 + +* Fri Sep 20 2013 Kalev Lember - 1.15.96-1 +- Update to 1.15.96 -* Mon Nov 03 2014 Florian Müllner 1.14.4-12 -- Include upstream patch to prevent a crash when hitting hardware limits - Resolves: rhbz#1115162 +* Fri Sep 20 2013 Matthias Clasen - 1.15.94-2 +- Fix a shell crash -* Tue Sep 30 2014 Owen Taylor 1.14.4-11 -- Fix a typo in the Requires +* Thu Sep 19 2013 Kalev Lember - 1.15.94-1 +- Update to 1.15.94 -* Thu Jul 17 2014 Owen Taylor 1.14.4-10 -- Add patch for quadbuffer stereo suppport - Resolves: rhbz#1108891 +* Thu Sep 12 2013 Kalev Lember - 1.15.92-3 +- Add missing build deps -* Tue Feb 11 2014 Owen Taylor - 1.14.4-9 -- Add upstream patches fixing problems that resulted in the entire - screen being redrawn too often with gnome shell. - Resolves: rhbz#1034941 +* Thu Sep 12 2013 Kalev Lember - 1.15.92-2 +- Add configure options that are needed to enable the gnome-shell + Wayland compositor -* Fri Jan 24 2014 Daniel Mach - 1.14.4-8 -- Mass rebuild 2014-01-24 +* Tue Sep 03 2013 Kalev Lember - 1.15.92-1 +- Update to 1.15.92 -* Sat Jan 11 2014 Florian Müllner - 1.14.4-7 -- Backport device manager cleanups for pointer emulation for touch events - in mutter - Resolves: rhbz#1051029 +* Thu Aug 22 2013 Kalev Lember - 1.15.90-1 +- Update to 1.15.90 -* Mon Jan 6 2014 Rui Matos - 1.14.4-5 -- Resolves: rhbz#1039137 - gnome-shell text labels switch font temporarily until they redraw again +* Fri Aug 09 2013 Kalev Lember - 1.15.2-1 +- Update to 1.15.2 +- Dropped upstream patches +- Backport patches for wayland / cogl 1.15.4 API changes -* Fri Dec 27 2013 Daniel Mach - 1.14.4-4 -- Mass rebuild 2013-12-27 +* Sat Aug 03 2013 Fedora Release Engineering - 1.14.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sun Jun 23 2013 Matthias Clasen - 1.14.4-3 - Backport another upstream patch for gnome-shell crashes (#954054)