mirror of
https://github.com/brl/mutter.git
synced 2024-11-30 03:50:47 -05:00
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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2908>
This commit is contained in:
parent
3988f5a47f
commit
f14dcb023d
@ -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_WINDOW_FLAG_KEYBOARD)
|
||||||
{
|
{
|
||||||
if ((window_drag->grab_op & META_GRAB_OP_KEYBOARD_MOVING) ==
|
if ((window_drag->grab_op & (META_GRAB_OP_WINDOW_DIR_MASK |
|
||||||
META_GRAB_OP_KEYBOARD_MOVING)
|
META_GRAB_OP_WINDOW_FLAG_UNKNOWN)) == 0)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||||
"Processing event for keyboard move");
|
"Processing event for keyboard move");
|
||||||
|
Loading…
Reference in New Issue
Block a user