diff options
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r-- | sway/input/cursor.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 27597640..d94a707c 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -449,15 +449,17 @@ static void dispatch_cursor_button_floating(struct sway_cursor *cursor, | |||
449 | bool over_title = edge == WLR_EDGE_NONE && !surface; | 449 | bool over_title = edge == WLR_EDGE_NONE && !surface; |
450 | 450 | ||
451 | // Check for beginning move | 451 | // Check for beginning move |
452 | if (button == BTN_LEFT && state == WLR_BUTTON_PRESSED && | 452 | uint32_t btn_move = config->floating_mod_inverse ? BTN_RIGHT : BTN_LEFT; |
453 | if (button == btn_move && state == WLR_BUTTON_PRESSED && | ||
453 | (mod_pressed || over_title)) { | 454 | (mod_pressed || over_title)) { |
454 | seat_begin_move(seat, cont, BTN_LEFT); | 455 | seat_begin_move(seat, cont, button); |
455 | return; | 456 | return; |
456 | } | 457 | } |
457 | 458 | ||
458 | // Check for beginning resize | 459 | // Check for beginning resize |
459 | bool resizing_via_border = button == BTN_LEFT && edge != WLR_EDGE_NONE; | 460 | bool resizing_via_border = button == BTN_LEFT && edge != WLR_EDGE_NONE; |
460 | bool resizing_via_mod = button == BTN_RIGHT && mod_pressed; | 461 | uint32_t btn_resize = config->floating_mod_inverse ? BTN_LEFT : BTN_RIGHT; |
462 | bool resizing_via_mod = button == btn_resize && mod_pressed; | ||
461 | if ((resizing_via_border || resizing_via_mod) && | 463 | if ((resizing_via_border || resizing_via_mod) && |
462 | state == WLR_BUTTON_PRESSED) { | 464 | state == WLR_BUTTON_PRESSED) { |
463 | if (edge == WLR_EDGE_NONE) { | 465 | if (edge == WLR_EDGE_NONE) { |