From 4fb968af7634fd5e66b162cddb7155d9a080af83 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 28 Dec 2020 17:03:12 +0100 Subject: [PATCH] clutter: Remove reentrancy checks at emit_event_chain() When using alt-tab to switch between windows, on a key handler we undo the compositor grab, which triggers a repick, which generates crossing events, which are handled in place, and trigger these reentrancy checks. On one hand, we do intend these crossings to take effect in place, rather than being queued (possibly after a number of already queued events). On the other hand, we now outright discourage generating events from random places (and hope to make it just not possible, eventually) thus we can afford not to protect against reentrancy caused by API misuse. So just drop these checks, and let these crossing events be properly handled. Part-of: --- clutter/clutter/clutter-main.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c index c2d31b4dd..c1fc47e57 100644 --- a/clutter/clutter/clutter-main.c +++ b/clutter/clutter/clutter-main.c @@ -1394,26 +1394,13 @@ event_click_count_generate (ClutterEvent *event) static inline void emit_event_chain (ClutterEvent *event) { - static gboolean lock = FALSE; - if (event->any.source == NULL) { CLUTTER_NOTE (EVENT, "No source set, discarding event"); return; } - /* reentrancy check */ - if (lock != FALSE) - { - g_warning ("Tried emitting event during event delivery, bailing out."); - return; - } - - lock = TRUE; - _clutter_actor_handle_event (event->any.source, event); - - lock = FALSE; } /*