1
0
Fork 0

keybindings: Minor refactor

Rewrite this codepath so it handles the grab ops that it cares
about, and ignores the rest. This way the code works despite
possible future modifications to MetaGrabOp (e.g.
META_GRAB_OP_WAYLAND_POPUP removal).

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
Carlos Garnacho 2022-09-28 14:05:05 +02:00 committed by Marge Bot
parent a7b8f06196
commit 1e289e8d81

View file

@ -2297,9 +2297,6 @@ process_key_event (MetaDisplay *display,
keep_grab = TRUE;
if (all_keys_grabbed)
{
if (display->grab_op == META_GRAB_OP_NONE)
return TRUE;
/* If we get here we have a global grab, because
* we're in some special keyboard mode such as window move
* mode.
@ -2321,7 +2318,7 @@ process_key_event (MetaDisplay *display,
keep_grab = process_keyboard_resize_grab (display, window, event);
}
}
else
else if (display->grab_op & META_GRAB_OP_MOVING)
{
meta_topic (META_DEBUG_KEYBINDINGS,
"Processing event for mouse-only move/resize");