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).
This commit is contained in:
tiosgz 2021-09-15 17:15:45 +00:00
parent 251afa161d
commit 09d0802a59

View file

@ -59,7 +59,8 @@ process_cursor_motion(struct kiwmi_server *server, uint32_t time)
if (new_geom.height < 1) { if (new_geom.height < 1) {
new_geom.y += new_geom.height; 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; new_geom.height += dy;
} }
@ -69,7 +70,8 @@ process_cursor_motion(struct kiwmi_server *server, uint32_t time)
if (new_geom.width < 1) { if (new_geom.width < 1) {
new_geom.x += new_geom.width; 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; new_geom.width += dx;
} }