wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 54781fef507cd5563a3f98649f650b1181916e06
parent 7b5978c34b907843bf5aac2569199f49c6220076
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Wed,  1 Mar 2006 17:37:06 +0100

implemented a heuristic to use gap-created space by all clients


Diffstat:
cmd/wm/column.c | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/cmd/wm/column.c b/cmd/wm/column.c @@ -96,9 +96,20 @@ arrange_column(Area *col) if(w < c->frame.rect.width) w = c->frame.rect.width; } - hdiff = (col->rect.height - h) / col->nclient; wdiff = (col->rect.width - w) / 2; + /* try to add rest space to all clients if not COL_STACK mode */ + if(col->mode != COL_STACK) { + for(i = 0; (h < col->rect.height) && (i < col->nclient); i++) { + Client *c = col->client[i]; + unsigned int tmp = c->frame.rect.height; + c->frame.rect.height += (col->rect.height - h); + resize_client(c, &c->frame.rect, 0, True); + h += (c->frame.rect.height - tmp); + } + } + + hdiff = (col->rect.height - h) / col->nclient; yoff = col->rect.y + hdiff / 2; for(i = 0; i < col->nclient; i++) { Client *c = col->client[i];