[mutter/wip/carlosg/picking-fixes: 2/4] clutter: Remove reentrancy checks at emit_event_chain()
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/picking-fixes: 2/4] clutter: Remove reentrancy checks at emit_event_chain()
- Date: Mon, 28 Dec 2020 21:43:34 +0000 (UTC)
commit 4fb968af7634fd5e66b162cddb7155d9a080af83
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Dec 28 17:03:12 2020 +0100
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1657>
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 c2d31b4dd8..c1fc47e57e 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;
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]