From 09d0802a59f360b2b31e9d3ec9a0f53394ccc1d7 Mon Sep 17 00:00:00 2001 From: tiosgz Date: Wed, 15 Sep 2021 17:15:45 +0000 Subject: [PATCH] Allow interactive move and resize at once There is no technical reason not to allow resizing on opposite edges, effectively getting single-directional interactive move (which can be combined with another edge for resizing in the other direction). --- kiwmi/input/cursor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kiwmi/input/cursor.c b/kiwmi/input/cursor.c index 9e7c3cc..b86fc30 100644 --- a/kiwmi/input/cursor.c +++ b/kiwmi/input/cursor.c @@ -59,7 +59,8 @@ process_cursor_motion(struct kiwmi_server *server, uint32_t time) if (new_geom.height < 1) { new_geom.y += new_geom.height; } - } else if (cursor->grabbed.resize_edges & WLR_EDGE_BOTTOM) { + } + if (cursor->grabbed.resize_edges & WLR_EDGE_BOTTOM) { new_geom.height += dy; } @@ -69,7 +70,8 @@ process_cursor_motion(struct kiwmi_server *server, uint32_t time) if (new_geom.width < 1) { new_geom.x += new_geom.width; } - } else if (cursor->grabbed.resize_edges & WLR_EDGE_RIGHT) { + } + if (cursor->grabbed.resize_edges & WLR_EDGE_RIGHT) { new_geom.width += dx; }