# HG changeset patch # User Anselm R Garbe # Date 1211204693 -3600 # Node ID 941bd7c15a32b0eaa4add8b5085ea32d8ae92fa9 # Parent 368a80dcf5bd7c38cac2f00b73eacbd7e983ba76 improving space usage if master is left of stack (default) diff -r 368a80dcf5bd -r 941bd7c15a32 tile.c --- a/tile.c Mon May 19 13:41:58 2008 +0100 +++ b/tile.c Mon May 19 14:44:53 2008 +0100 @@ -26,7 +26,7 @@ void tile(void) { - int y, h; + int x, y, h, w; unsigned int i, n; Client *c; @@ -46,16 +46,18 @@ return; /* tile stack */ + x = (tx > c->x + c->w) ? c->x + c->w + 2 * c->bw : tw; y = ty; + w = (tx > c->x + c->w) ? wx + ww - x : tw; h = th / n; if(h < bh) h = th; for(i = 0, c = nextunfloating(c->next); c; c = nextunfloating(c->next), i++) { if(i + 1 == n) /* remainder */ - tileresize(c, tx, y, tw - 2 * c->bw, (ty + th) - y - 2 * c->bw); + tileresize(c, x, y, w - 2 * c->bw, (ty + th) - y - 2 * c->bw); else - tileresize(c, tx, y, tw - 2 * c->bw, h - 2 * c->bw); + tileresize(c, x, y, w - 2 * c->bw, h - 2 * c->bw); if(h != th) y = c->y + c->h + 2 * c->bw; }