mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
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:
parent
a7b8f06196
commit
1e289e8d81
@ -2297,9 +2297,6 @@ process_key_event (MetaDisplay *display,
|
|||||||
keep_grab = TRUE;
|
keep_grab = TRUE;
|
||||||
if (all_keys_grabbed)
|
if (all_keys_grabbed)
|
||||||
{
|
{
|
||||||
if (display->grab_op == META_GRAB_OP_NONE)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
/* If we get here we have a global grab, because
|
/* If we get here we have a global grab, because
|
||||||
* we're in some special keyboard mode such as window move
|
* we're in some special keyboard mode such as window move
|
||||||
* mode.
|
* mode.
|
||||||
@ -2321,7 +2318,7 @@ process_key_event (MetaDisplay *display,
|
|||||||
keep_grab = process_keyboard_resize_grab (display, window, event);
|
keep_grab = process_keyboard_resize_grab (display, window, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (display->grab_op & META_GRAB_OP_MOVING)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Processing event for mouse-only move/resize");
|
"Processing event for mouse-only move/resize");
|
||||||
|
Loading…
Reference in New Issue
Block a user