diff options
author | 2015-08-22 21:54:39 -0700 | |
---|---|---|
committer | 2015-08-22 21:54:39 -0700 | |
commit | f24b78898a7a7fc98f896f6d1d374c602ee30952 (patch) | |
tree | 0dc4ac5d3d25e93f87d668f44e9b4118a7d0d9d2 /sway/input_state.c | |
parent | small change (diff) | |
download | sway-f24b78898a7a7fc98f896f6d1d374c602ee30952.tar.gz sway-f24b78898a7a7fc98f896f6d1d374c602ee30952.tar.zst sway-f24b78898a7a7fc98f896f6d1d374c602ee30952.zip |
dont swap view with workspace...
Diffstat (limited to 'sway/input_state.c')
-rw-r--r-- | sway/input_state.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sway/input_state.c b/sway/input_state.c index 03904322..cb8632de 100644 --- a/sway/input_state.c +++ b/sway/input_state.c | |||
@@ -234,7 +234,8 @@ void pointer_mode_update(void) { | |||
234 | 234 | ||
235 | case M_TILING | M_DRAGGING: | 235 | case M_TILING | M_DRAGGING: |
236 | // swap current view under pointer with dragged view | 236 | // swap current view under pointer with dragged view |
237 | if (pointer_state.view && pointer_state.view != initial.ptr) { | 237 | if (pointer_state.view && pointer_state.view->type == C_VIEW |
238 | && pointer_state.view != initial.ptr) { | ||
238 | // Swap them around | 239 | // Swap them around |
239 | swap_container(pointer_state.view, initial.ptr); | 240 | swap_container(pointer_state.view, initial.ptr); |
240 | update_geometry(pointer_state.view); | 241 | update_geometry(pointer_state.view); |
@@ -254,12 +255,10 @@ void pointer_mode_update(void) { | |||
254 | if (initial.w + dx > min_sane_w && initial.lr.w - dx > min_sane_w) { | 255 | if (initial.w + dx > min_sane_w && initial.lr.w - dx > min_sane_w) { |
255 | initial.ptr->width = initial.w + dx; | 256 | initial.ptr->width = initial.w + dx; |
256 | initial.lr.ptr->width = initial.lr.w - dx; | 257 | initial.lr.ptr->width = initial.lr.w - dx; |
257 | initial.lr.ptr->x = initial.lr.x + dx; | ||
258 | } | 258 | } |
259 | } else { //lock.right | 259 | } else { //lock.right |
260 | if (initial.w - dx > min_sane_w && initial.lr.w + dx > min_sane_w) { | 260 | if (initial.w - dx > min_sane_w && initial.lr.w + dx > min_sane_w) { |
261 | initial.ptr->width = initial.w - dx; | 261 | initial.ptr->width = initial.w - dx; |
262 | initial.ptr->x = initial.x + dx; | ||
263 | initial.lr.ptr->width = initial.lr.w + dx; | 262 | initial.lr.ptr->width = initial.lr.w + dx; |
264 | } | 263 | } |
265 | changed = true; | 264 | changed = true; |
@@ -271,12 +270,10 @@ void pointer_mode_update(void) { | |||
271 | if (initial.h + dy > min_sane_h && initial.tb.h - dy > min_sane_h) { | 270 | if (initial.h + dy > min_sane_h && initial.tb.h - dy > min_sane_h) { |
272 | initial.ptr->height = initial.h + dy; | 271 | initial.ptr->height = initial.h + dy; |
273 | initial.tb.ptr->height = initial.tb.h - dy; | 272 | initial.tb.ptr->height = initial.tb.h - dy; |
274 | initial.tb.ptr->y = initial.tb.y + dy; | ||
275 | } | 273 | } |
276 | } else { //lock.bottom | 274 | } else { //lock.bottom |
277 | if (initial.h - dy > min_sane_h && initial.tb.h + dy > min_sane_h) { | 275 | if (initial.h - dy > min_sane_h && initial.tb.h + dy > min_sane_h) { |
278 | initial.ptr->height = initial.h - dy; | 276 | initial.ptr->height = initial.h - dy; |
279 | initial.ptr->y = initial.y + dy; | ||
280 | initial.tb.ptr->height = initial.tb.h + dy; | 277 | initial.tb.ptr->height = initial.tb.h + dy; |
281 | } | 278 | } |
282 | changed = true; | 279 | changed = true; |