mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 07:56:31 +01:00
dont swap view with workspace...
This commit is contained in:
parent
a4ded14991
commit
f24b78898a
2 changed files with 2 additions and 6 deletions
|
@ -2,7 +2,6 @@
|
||||||
#define _SWAY_RESIZE_H
|
#define _SWAY_RESIZE_H
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
bool mouse_resize_tiled(struct wlc_origin prev_pos);
|
|
||||||
bool resize_tiled(int amount, bool use_width);
|
bool resize_tiled(int amount, bool use_width);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -234,7 +234,8 @@ void pointer_mode_update(void) {
|
||||||
|
|
||||||
case M_TILING | M_DRAGGING:
|
case M_TILING | M_DRAGGING:
|
||||||
// swap current view under pointer with dragged view
|
// 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 them around
|
||||||
swap_container(pointer_state.view, initial.ptr);
|
swap_container(pointer_state.view, initial.ptr);
|
||||||
update_geometry(pointer_state.view);
|
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) {
|
if (initial.w + dx > min_sane_w && initial.lr.w - dx > min_sane_w) {
|
||||||
initial.ptr->width = initial.w + dx;
|
initial.ptr->width = initial.w + dx;
|
||||||
initial.lr.ptr->width = initial.lr.w - dx;
|
initial.lr.ptr->width = initial.lr.w - dx;
|
||||||
initial.lr.ptr->x = initial.lr.x + dx;
|
|
||||||
}
|
}
|
||||||
} else { //lock.right
|
} else { //lock.right
|
||||||
if (initial.w - dx > min_sane_w && initial.lr.w + dx > min_sane_w) {
|
if (initial.w - dx > min_sane_w && initial.lr.w + dx > min_sane_w) {
|
||||||
initial.ptr->width = initial.w - dx;
|
initial.ptr->width = initial.w - dx;
|
||||||
initial.ptr->x = initial.x + dx;
|
|
||||||
initial.lr.ptr->width = initial.lr.w + dx;
|
initial.lr.ptr->width = initial.lr.w + dx;
|
||||||
}
|
}
|
||||||
changed = true;
|
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) {
|
if (initial.h + dy > min_sane_h && initial.tb.h - dy > min_sane_h) {
|
||||||
initial.ptr->height = initial.h + dy;
|
initial.ptr->height = initial.h + dy;
|
||||||
initial.tb.ptr->height = initial.tb.h - dy;
|
initial.tb.ptr->height = initial.tb.h - dy;
|
||||||
initial.tb.ptr->y = initial.tb.y + dy;
|
|
||||||
}
|
}
|
||||||
} else { //lock.bottom
|
} else { //lock.bottom
|
||||||
if (initial.h - dy > min_sane_h && initial.tb.h + dy > min_sane_h) {
|
if (initial.h - dy > min_sane_h && initial.tb.h + dy > min_sane_h) {
|
||||||
initial.ptr->height = initial.h - dy;
|
initial.ptr->height = initial.h - dy;
|
||||||
initial.ptr->y = initial.y + dy;
|
|
||||||
initial.tb.ptr->height = initial.tb.h + dy;
|
initial.tb.ptr->height = initial.tb.h + dy;
|
||||||
}
|
}
|
||||||
changed = true;
|
changed = true;
|
||||||
|
|
Loading…
Reference in a new issue