sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 354731f1616ec76385d3472bd0bf188f5a350796
parent 1a9179dbab91490c4a8dc45f8630ac139c96efe6
Author: emersion <contact@emersion.fr>
Date:   Tue, 24 Jul 2018 12:10:08 +0100

Merge pull request #2344 from RyanDwyer/mod-resize-any-direction

Make mod+resize work in any direction
Diffstat:
Msway/input/cursor.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/sway/input/cursor.c b/sway/input/cursor.c @@ -460,6 +460,12 @@ static void dispatch_cursor_button_floating(struct sway_cursor *cursor, bool resizing_via_mod = button == BTN_RIGHT && mod_pressed; if ((resizing_via_border || resizing_via_mod) && state == WLR_BUTTON_PRESSED) { + if (edge == WLR_EDGE_NONE) { + edge |= cursor->cursor->x > cont->x + cont->width / 2 ? + WLR_EDGE_RIGHT : WLR_EDGE_LEFT; + edge |= cursor->cursor->y > cont->y + cont->height / 2 ? + WLR_EDGE_BOTTOM : WLR_EDGE_TOP; + } seat_begin_resize(seat, cont, button, edge); return; }