aboutsummaryrefslogtreecommitdiff
path: root/sway/input_state.c
diff options
context:
space:
mode:
authortaiyu <taiyu.len@gmail.com>2015-08-22 21:54:39 -0700
committertaiyu <taiyu.len@gmail.com>2015-08-22 21:54:39 -0700
commitf24b78898a7a7fc98f896f6d1d374c602ee30952 (patch)
tree0dc4ac5d3d25e93f87d668f44e9b4118a7d0d9d2 /sway/input_state.c
parenta4ded14991cf84ba7069e4e6748a218f8a5f1be6 (diff)
dont swap view with workspace...
Diffstat (limited to 'sway/input_state.c')
-rw-r--r--sway/input_state.c7
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) {
case M_TILING | M_DRAGGING:
// swap current view under pointer with dragged view
- if (pointer_state.view && pointer_state.view != initial.ptr) {
+ if (pointer_state.view && pointer_state.view->type == C_VIEW
+ && pointer_state.view != initial.ptr) {
// Swap them around
swap_container(pointer_state.view, initial.ptr);
update_geometry(pointer_state.view);
@@ -254,12 +255,10 @@ void pointer_mode_update(void) {
if (initial.w + dx > min_sane_w && initial.lr.w - dx > min_sane_w) {
initial.ptr->width = initial.w + dx;
initial.lr.ptr->width = initial.lr.w - dx;
- initial.lr.ptr->x = initial.lr.x + dx;
}
} else { //lock.right
if (initial.w - dx > min_sane_w && initial.lr.w + dx > min_sane_w) {
initial.ptr->width = initial.w - dx;
- initial.ptr->x = initial.x + dx;
initial.lr.ptr->width = initial.lr.w + dx;
}
changed = true;
@@ -271,12 +270,10 @@ void pointer_mode_update(void) {
if (initial.h + dy > min_sane_h && initial.tb.h - dy > min_sane_h) {
initial.ptr->height = initial.h + dy;
initial.tb.ptr->height = initial.tb.h - dy;
- initial.tb.ptr->y = initial.tb.y + dy;
}
} else { //lock.bottom
if (initial.h - dy > min_sane_h && initial.tb.h + dy > min_sane_h) {
initial.ptr->height = initial.h - dy;
- initial.ptr->y = initial.y + dy;
initial.tb.ptr->height = initial.tb.h + dy;
}
changed = true;