baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.73k stars 414 forks source link

When resizing diagonally, adjust ratios for both fences #1432

Closed emanuele6 closed 1 year ago

emanuele6 commented 1 year ago

Instead of adjusting ratios only for the horizontal fence.


From this state:

+---+---+---------+
|   |   |         |             1
|   |   |    C    |          /     \
|   |   |         |         2       3
| A | B +-----+---+        / \     / \
|   |   |     |   |       A   B   C   4
|   |   |  D  | E |                  / \
|   |   |     |   |                 D   E
+---+---+-----+---+

Resizing D diagonally (top_left) would not adjust any ratio. Only resizing it horizontally (left) would.

This can be reproduced with bspc node D -z left -128 0 vs bspc node D -z top_left -128 -128 (or even bspc node D -z top_left -128 0).

It can also be reproduced by starting the resize_corner pointer action from node B (right) vs starting it from C (bottom_lefŧ).

Video of the bug being reproduced on the master branch (527864d8716462e52f85a419f97a776c0643a68c)

https://user-images.githubusercontent.com/20175435/216805549-cedc3b37-5ff2-45ae-b858-5fac76860f7c.mp4