layouts: spiral: Avoid gaps between windows
commit94a8c725968535fd74fe399846f193ecc6ce4c29
authorFabienne Ducroquet <fabiduc@gmail.com>
Sat, 18 Jan 2014 15:12:30 +0000 (18 16:12 +0100)
committerUli Schlachter <psychon@znc.in>
Thu, 23 Jan 2014 17:39:52 +0000 (23 18:39 +0100)
treeacb4e15a534639c06a525ae9261d904e574fa2ed
parent7adc21e2ca97e51f249cbcaaeb53da0fee96a506
layouts: spiral: Avoid gaps between windows

When an area is split in two, for example horizontally, one of the windows
should have height math.floor(previous height / 2) and the other
math.ceil(previous height / 2), to be certain that no gaps are left between the
windows.

For instance, if the first window has height h and the second window has height
math.floor(h / 2), the height of the third window should be math.ceil(h / 2)
instead of the same as for the second window.

So to compute the size of window n + 1 it’s necessary to remember the size of
window n - 1 as well as that of window n.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
lib/awful/layout/suit/spiral.lua.in