summaryrefslogtreecommitdiffstats
path: root/sway/input_state.c
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-08-22 21:23:22 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-08-22 21:23:22 -0700
commita4ded14991cf84ba7069e4e6748a218f8a5f1be6 (patch)
tree3fe36054e5deba3036db8c01bc4ad64461b5c269 /sway/input_state.c
parentno mode for fullscreen (diff)
downloadsway-a4ded14991cf84ba7069e4e6748a218f8a5f1be6.tar.gz
sway-a4ded14991cf84ba7069e4e6748a218f8a5f1be6.tar.zst
sway-a4ded14991cf84ba7069e4e6748a218f8a5f1be6.zip
small change
Diffstat (limited to 'sway/input_state.c')
-rw-r--r--sway/input_state.c7
1 files changed, 7 insertions, 0 deletions
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) {
114 if (initial.ptr->is_floating) { 114 if (initial.ptr->is_floating) {
115 pointer_state.mode = M_RESIZING | M_FLOATING; 115 pointer_state.mode = M_RESIZING | M_FLOATING;
116 } else { 116 } else {
117 bool reset = true;
117 pointer_state.mode = M_RESIZING | M_TILING; 118 pointer_state.mode = M_RESIZING | M_TILING;
118 if ((initial.lr.ptr = get_swayc_in_direction(initial.ptr, lock.left ? MOVE_RIGHT: MOVE_LEFT))) { 119 if ((initial.lr.ptr = get_swayc_in_direction(initial.ptr, lock.left ? MOVE_RIGHT: MOVE_LEFT))) {
119 initial.lr.x = initial.lr.ptr->x; 120 initial.lr.x = initial.lr.ptr->x;
120 initial.lr.w = initial.lr.ptr->width; 121 initial.lr.w = initial.lr.ptr->width;
122 reset = false;
121 } 123 }
122 if ((initial.tb.ptr = get_swayc_in_direction(initial.ptr, lock.top ? MOVE_DOWN: MOVE_UP))) { 124 if ((initial.tb.ptr = get_swayc_in_direction(initial.ptr, lock.top ? MOVE_DOWN: MOVE_UP))) {
123 initial.tb.y = initial.tb.ptr->y; 125 initial.tb.y = initial.tb.ptr->y;
124 initial.tb.h = initial.tb.ptr->height; 126 initial.tb.h = initial.tb.ptr->height;
127 reset = false;
128 }
129 // If nothing changes just undo the mode
130 if (reset) {
131 pointer_state.mode = 0;
125 } 132 }
126 } 133 }
127} 134}