diff options
author | taiyu <taiyu.len@gmail.com> | 2015-08-22 21:54:39 -0700 |
---|---|---|
committer | taiyu <taiyu.len@gmail.com> | 2015-08-22 21:54:39 -0700 |
commit | f24b78898a7a7fc98f896f6d1d374c602ee30952 (patch) | |
tree | 0dc4ac5d3d25e93f87d668f44e9b4118a7d0d9d2 | |
parent | small change (diff) | |
download | sway-f24b78898a7a7fc98f896f6d1d374c602ee30952.tar.gz sway-f24b78898a7a7fc98f896f6d1d374c602ee30952.tar.zst sway-f24b78898a7a7fc98f896f6d1d374c602ee30952.zip |
dont swap view with workspace...
-rw-r--r-- | include/resize.h | 1 | ||||
-rw-r--r-- | sway/input_state.c | 7 |
2 files changed, 2 insertions, 6 deletions
diff --git a/include/resize.h b/include/resize.h index 04209983..8d205d3b 100644 --- a/include/resize.h +++ b/include/resize.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _SWAY_RESIZE_H | 2 | #define _SWAY_RESIZE_H |
3 | #include <stdbool.h> | 3 | #include <stdbool.h> |
4 | 4 | ||
5 | bool mouse_resize_tiled(struct wlc_origin prev_pos); | ||
6 | bool resize_tiled(int amount, bool use_width); | 5 | bool resize_tiled(int amount, bool use_width); |
7 | 6 | ||
8 | #endif | 7 | #endif |
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; |