[mutter/wip/carlosg/grabs-pt2: 87/95] clutter: Key events should not be delivered to non reactive actors
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/grabs-pt2: 87/95] clutter: Key events should not be delivered to non reactive actors
- Date: Wed, 5 Jan 2022 17:37:11 +0000 (UTC)
commit a29b80e48fce8dc5dbbd89da1e7796b961b08391
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Oct 27 11:25:55 2021 +0200
clutter: Key events should not be delivered to non reactive actors
Drop this piece of old code that assumes all actors want key events.
We currently have the reactive flag to indicate these want input.
clutter/clutter/clutter-actor.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 5319e42b4d..aeba676d2d 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -19027,16 +19027,9 @@ _clutter_actor_handle_event (ClutterActor *self,
{
GPtrArray *event_tree;
ClutterActor *iter;
- gboolean is_key_event, in_root = FALSE;
+ gboolean in_root = FALSE;
gint i = 0;
- /* XXX - for historical reasons that are now lost in the mists of time,
- * key events are delivered regardless of whether an actor is set as
- * reactive; this should be changed for 2.0.
- */
- is_key_event = event->type == CLUTTER_KEY_PRESS ||
- event->type == CLUTTER_KEY_RELEASE;
-
event_tree = g_ptr_array_sized_new (64);
g_ptr_array_set_free_func (event_tree, (GDestroyNotify) g_object_unref);
@@ -19047,8 +19040,7 @@ _clutter_actor_handle_event (ClutterActor *self,
ClutterActor *parent = iter->priv->parent;
if (CLUTTER_ACTOR_IS_REACTIVE (iter) || /* an actor must be reactive */
- parent == NULL || /* unless it's the stage */
- is_key_event) /* or this is a key event */
+ parent == NULL) /* unless it's the stage */
{
/* keep a reference on the actor, so that it remains valid
* for the duration of the signal emission
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]