From f14dcb023d7c9af248d8cf8dc73d3d98160a2f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 10 Mar 2023 19:11:33 +0100 Subject: [PATCH] compositor/window-drag: Fix keyboard resize Both GRAB_OP_KEYBOARD_MOVING and GRAB_OP_KEYBOARD_RESIZING_* are defined as GRAB_OP_WINDOW_BASE with FLAG_KEYBOARD set, but the latter have additional bits set to indicate the direction. That is, the GRAB_OP_KEYBOARD_MOVING bitmask cannot be used to differentiate between move- and resize operations. Instead, check that no direction bits are set. https://gitlab.gnome.org/GNOME/mutter/-/issues/2684 Part-of: --- src/compositor/meta-window-drag.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compositor/meta-window-drag.c b/src/compositor/meta-window-drag.c index 9410aa710..2d16da4a2 100644 --- a/src/compositor/meta-window-drag.c +++ b/src/compositor/meta-window-drag.c @@ -1097,8 +1097,8 @@ process_key_event (MetaWindowDrag *window_drag, if (window_drag->grab_op & META_GRAB_OP_WINDOW_FLAG_KEYBOARD) { - if ((window_drag->grab_op & META_GRAB_OP_KEYBOARD_MOVING) == - META_GRAB_OP_KEYBOARD_MOVING) + if ((window_drag->grab_op & (META_GRAB_OP_WINDOW_DIR_MASK | + META_GRAB_OP_WINDOW_FLAG_UNKNOWN)) == 0) { meta_topic (META_DEBUG_KEYBINDINGS, "Processing event for keyboard move");