mirror of
https://github.com/swaywm/sway.git
synced 2024-11-11 21:14:10 +01:00
Fix mod+resize
Fixes #2479. It was missing a mod_pressed check. This also moves the parent traversal into the `if` block.
This commit is contained in:
parent
db4b4935b3
commit
d22420689d
@ -726,13 +726,13 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
|
||||
}
|
||||
|
||||
// Via mod+click
|
||||
uint32_t btn_resize = config->floating_mod_inverse ?
|
||||
BTN_LEFT : BTN_RIGHT;
|
||||
if (mod_pressed && button == btn_resize) {
|
||||
struct sway_container *floater = cont;
|
||||
while (floater->parent->layout != L_FLOATING) {
|
||||
floater = floater->parent;
|
||||
}
|
||||
uint32_t btn_resize = config->floating_mod_inverse ?
|
||||
BTN_LEFT : BTN_RIGHT;
|
||||
if (button == btn_resize) {
|
||||
edge = 0;
|
||||
edge |= cursor->cursor->x > floater->x + floater->width / 2 ?
|
||||
WLR_EDGE_RIGHT : WLR_EDGE_LEFT;
|
||||
|
Loading…
Reference in New Issue
Block a user