mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 18:01:37 -05:00
Fail when there's no fence to move
This commit is contained in:
parent
8f9e50877e
commit
5a98b655ec
1 changed files with 3 additions and 0 deletions
3
window.c
3
window.c
|
@ -549,6 +549,9 @@ bool resize_client(coordinates_t *loc, resize_handle_t rh, int dx, int dy)
|
|||
} else if (rh & HANDLE_BOTTOM) {
|
||||
horizontal_fence = find_fence(n, DIR_SOUTH);
|
||||
}
|
||||
if (vertical_fence == NULL && horizontal_fence == NULL) {
|
||||
return false;
|
||||
}
|
||||
if (vertical_fence != NULL) {
|
||||
double sr = vertical_fence->split_ratio + (double) dx / vertical_fence->rectangle.width;
|
||||
sr = MAX(0, sr);
|
||||
|
|
Loading…
Add table
Reference in a new issue