Browse Source

improving space usage if master is left of stack (default)

master
Anselm R Garbe 17 years ago
parent
commit
4a5c8d84db
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      tile.c

+ 5
- 3
tile.c View File

@ -26,7 +26,7 @@ setmfact(const char *arg) {
void void
tile(void) { tile(void) {
int y, h;
int x, y, h, w;
unsigned int i, n; unsigned int i, n;
Client *c; Client *c;
@ -46,16 +46,18 @@ tile(void) {
return; return;
/* tile stack */ /* tile stack */
x = (tx > c->x + c->w) ? c->x + c->w + 2 * c->bw : tw;
y = ty; y = ty;
w = (tx > c->x + c->w) ? wx + ww - x : tw;
h = th / n; h = th / n;
if(h < bh) if(h < bh)
h = th; h = th;
for(i = 0, c = nextunfloating(c->next); c; c = nextunfloating(c->next), i++) { for(i = 0, c = nextunfloating(c->next); c; c = nextunfloating(c->next), i++) {
if(i + 1 == n) /* remainder */ 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 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) if(h != th)
y = c->y + c->h + 2 * c->bw; y = c->y + c->h + 2 * c->bw;
} }


Loading…
Cancel
Save