made tile simplier
a200c396
1 file(s) · +20 −23
| 39 | 39 | ||
| 40 | 40 | nx = wax; |
|
| 41 | 41 | ny = way; |
|
| 42 | - | for(i = 0, c = clients; c; c = c->next) |
|
| 43 | - | if(isvisible(c)) { |
|
| 44 | - | if(c->isfloating) |
|
| 45 | - | continue; |
|
| 46 | - | c->ismax = False; |
|
| 47 | - | if(i == 0) { /* master */ |
|
| 48 | - | nw = mw - 2 * c->border; |
|
| 49 | - | nh = wah - 2 * c->border; |
|
| 42 | + | for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) { |
|
| 43 | + | c->ismax = False; |
|
| 44 | + | if(i == 0) { /* master */ |
|
| 45 | + | nw = mw - 2 * c->border; |
|
| 46 | + | nh = wah - 2 * c->border; |
|
| 47 | + | } |
|
| 48 | + | else { /* tile window */ |
|
| 49 | + | if(i == 1) { |
|
| 50 | + | ny = way; |
|
| 51 | + | nx += mw; |
|
| 50 | 52 | } |
|
| 51 | - | else { /* tile window */ |
|
| 52 | - | if(i == 1) { |
|
| 53 | - | ny = way; |
|
| 54 | - | nx += mw; |
|
| 55 | - | } |
|
| 56 | - | nw = waw - mw - 2 * c->border; |
|
| 57 | - | if(i + 1 == n) /* remainder */ |
|
| 58 | - | nh = (way + wah) - ny - 2 * c->border; |
|
| 59 | - | else |
|
| 60 | - | nh = th - 2 * c->border; |
|
| 61 | - | } |
|
| 62 | - | resize(c, nx, ny, nw, nh, False); |
|
| 63 | - | if(n > 1 && th != wah) |
|
| 64 | - | ny += nh + 2 * c->border; |
|
| 65 | - | i++; |
|
| 53 | + | nw = waw - mw - 2 * c->border; |
|
| 54 | + | if(i + 1 == n) /* remainder */ |
|
| 55 | + | nh = (way + wah) - ny - 2 * c->border; |
|
| 56 | + | else |
|
| 57 | + | nh = th - 2 * c->border; |
|
| 66 | 58 | } |
|
| 59 | + | resize(c, nx, ny, nw, nh, False); |
|
| 60 | + | if(n > 1 && th != wah) |
|
| 61 | + | ny += nh + 2 * c->border; |
|
| 62 | + | i++; |
|
| 63 | + | } |
|
| 67 | 64 | } |
|
| 68 | 65 | ||
| 69 | 66 | void |