sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 3c84250be8a31ec08f3c8057d589b5b040673b36
parent f7269684d018658c508f82529f5ca24c02dfd227
Author: wil <william.barsse@gmail.com>
Date:   Sat,  7 Jan 2017 18:20:13 +0100

[fix] resize should now preserve surrounding container's dimensions

- prior to this modification, the requested pixels were added/removed
  to both edges of the modified container. To preserve sizes,
  only half the pixels should be added/removed to each edge.

Diffstat:
Msway/commands/resize.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sway/commands/resize.c b/sway/commands/resize.c @@ -175,15 +175,15 @@ static bool resize_tiled(int amount, bool use_width) { } else { if (use_major) { for (int j = i; j < next_i; ++j) { - recursive_resize(parent->children->items[j], pixels, + recursive_resize(parent->children->items[j], pixels / 2, use_width ? WLC_RESIZE_EDGE_LEFT : WLC_RESIZE_EDGE_TOP); - recursive_resize(parent->children->items[j], pixels, + recursive_resize(parent->children->items[j], pixels / 2, use_width ? WLC_RESIZE_EDGE_RIGHT : WLC_RESIZE_EDGE_BOTTOM); } } else { - recursive_resize(sibling, pixels, + recursive_resize(sibling, pixels / 2, use_width ? WLC_RESIZE_EDGE_LEFT : WLC_RESIZE_EDGE_TOP); - recursive_resize(sibling, pixels, + recursive_resize(sibling, pixels / 2, use_width ? WLC_RESIZE_EDGE_RIGHT : WLC_RESIZE_EDGE_BOTTOM); } }