From a4ded14991cf84ba7069e4e6748a218f8a5f1be6 Mon Sep 17 00:00:00 2001 From: taiyu Date: Sat, 22 Aug 2015 21:23:22 -0700 Subject: small change --- sway/input_state.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sway') diff --git a/sway/input_state.c b/sway/input_state.c index a63fc01c..03904322 100644 --- a/sway/input_state.c +++ b/sway/input_state.c @@ -114,14 +114,21 @@ static void pointer_mode_set_right(void) { if (initial.ptr->is_floating) { pointer_state.mode = M_RESIZING | M_FLOATING; } else { + bool reset = true; pointer_state.mode = M_RESIZING | M_TILING; if ((initial.lr.ptr = get_swayc_in_direction(initial.ptr, lock.left ? MOVE_RIGHT: MOVE_LEFT))) { initial.lr.x = initial.lr.ptr->x; initial.lr.w = initial.lr.ptr->width; + reset = false; } if ((initial.tb.ptr = get_swayc_in_direction(initial.ptr, lock.top ? MOVE_DOWN: MOVE_UP))) { initial.tb.y = initial.tb.ptr->y; initial.tb.h = initial.tb.ptr->height; + reset = false; + } + // If nothing changes just undo the mode + if (reset) { + pointer_state.mode = 0; } } } -- cgit v1.2.3