improving space usage if master is left of stack (default)
4a5c8d84
1 file(s) · +5 −3
| 26 | 26 | ||
| 27 | 27 | void |
|
| 28 | 28 | tile(void) { |
|
| 29 | - | int y, h; |
|
| 29 | + | int x, y, h, w; |
|
| 30 | 30 | unsigned int i, n; |
|
| 31 | 31 | Client *c; |
|
| 32 | 32 | ||
| 46 | 46 | return; |
|
| 47 | 47 | ||
| 48 | 48 | /* tile stack */ |
|
| 49 | + | x = (tx > c->x + c->w) ? c->x + c->w + 2 * c->bw : tw; |
|
| 49 | 50 | y = ty; |
|
| 51 | + | w = (tx > c->x + c->w) ? wx + ww - x : tw; |
|
| 50 | 52 | h = th / n; |
|
| 51 | 53 | if(h < bh) |
|
| 52 | 54 | h = th; |
|
| 53 | 55 | ||
| 54 | 56 | for(i = 0, c = nextunfloating(c->next); c; c = nextunfloating(c->next), i++) { |
|
| 55 | 57 | if(i + 1 == n) /* remainder */ |
|
| 56 | - | tileresize(c, tx, y, tw - 2 * c->bw, (ty + th) - y - 2 * c->bw); |
|
| 58 | + | tileresize(c, x, y, w - 2 * c->bw, (ty + th) - y - 2 * c->bw); |
|
| 57 | 59 | else |
|
| 58 | - | tileresize(c, tx, y, tw - 2 * c->bw, h - 2 * c->bw); |
|
| 60 | + | tileresize(c, x, y, w - 2 * c->bw, h - 2 * c->bw); |
|
| 59 | 61 | if(h != th) |
|
| 60 | 62 | y = c->y + c->h + 2 * c->bw; |
|
| 61 | 63 | } |
|