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>
This commit is contained in:
parent
96820a9979
commit
4fb968af76
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user