1
0
Fork 0

clutter: Make detached actions let events through

Actions might get detached sometime during event processing,
at a time that the stage did already prepare an emission chain
holding references to the actions and actors that need to handle
events. This means actions might become detached, but still handle
the incoming event, or possible crossing events generated in-place
when the actor becomes unparented.

Avoid this situation, by skipping event handling on actions that
went detached, we will just instruct to continue event processing.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3988>
This commit is contained in:
Carlos Garnacho 2024-08-30 18:11:27 +02:00 committed by Marge Bot
parent a393bd0ad6
commit fe9fff2729

View file

@ -99,10 +99,11 @@ gboolean
clutter_action_handle_event (ClutterAction *action,
const ClutterEvent *event)
{
gboolean retval;
gboolean retval = CLUTTER_EVENT_PROPAGATE;
g_object_ref (action);
retval = CLUTTER_ACTION_GET_CLASS (action)->handle_event (action, event);
if (clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action)))
retval = CLUTTER_ACTION_GET_CLASS (action)->handle_event (action, event);
g_object_unref (action);
return retval;