aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-08-18 09:15:30 +0100
committerGitHub <noreply@github.com>2018-08-18 09:15:30 +0100
commitcfe205b36fba77ba64184e0c1e8dcb211a7a8904 (patch)
tree1d0cb9ea6bd04c139c16fc08461ea286d01c7a78 /sway/input
parentdb4b4935b38b778398170d083a693f82831f1936 (diff)
parentd22420689df44c2c6e984cdcc5de196577f12a1e (diff)
Merge pull request #2480 from RyanDwyer/fix-mod-resize
Fix mod+resize
Diffstat (limited to 'sway/input')
-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 3b70b471..6208ce32 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -726,13 +726,13 @@ void dispatch_cursor_button(struct sway_cursor *cursor,
}
// Via mod+click
- 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) {
+ if (mod_pressed && button == btn_resize) {
+ struct sway_container *floater = cont;
+ while (floater->parent->layout != L_FLOATING) {
+ floater = floater->parent;
+ }
edge = 0;
edge |= cursor->cursor->x > floater->x + floater->width / 2 ?
WLR_EDGE_RIGHT : WLR_EDGE_LEFT;