summaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 37fb203d..762b8081 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -742,13 +742,13 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
742 } 742 }
743 743
744 // Via mod+click 744 // Via mod+click
745 struct sway_container *floater = cont;
746 while (floater->parent->layout != L_FLOATING) {
747 floater = floater->parent;
748 }
749 uint32_t btn_resize = config->floating_mod_inverse ? 745 uint32_t btn_resize = config->floating_mod_inverse ?
750 BTN_LEFT : BTN_RIGHT; 746 BTN_LEFT : BTN_RIGHT;
751 if (button == btn_resize) { 747 if (mod_pressed && button == btn_resize) {
748 struct sway_container *floater = cont;
749 while (floater->parent->layout != L_FLOATING) {
750 floater = floater->parent;
751 }
752 edge = 0; 752 edge = 0;
753 edge |= cursor->cursor->x > floater->x + floater->width / 2 ? 753 edge |= cursor->cursor->x > floater->x + floater->width / 2 ?
754 WLR_EDGE_RIGHT : WLR_EDGE_LEFT; 754 WLR_EDGE_RIGHT : WLR_EDGE_LEFT;