made tile simplier

master
Anselm R. Garbe 2007-08-13 19:19:38 +02:00
parent 77044e8765
commit a200c39635
1 changed files with 21 additions and 24 deletions

45
tile.c
View File

@ -39,31 +39,28 @@ tile(void) {
nx = wax; nx = wax;
ny = way; ny = way;
for(i = 0, c = clients; c; c = c->next) for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) {
if(isvisible(c)) { c->ismax = False;
if(c->isfloating) if(i == 0) { /* master */
continue; nw = mw - 2 * c->border;
c->ismax = False; nh = wah - 2 * c->border;
if(i == 0) { /* master */
nw = mw - 2 * c->border;
nh = wah - 2 * c->border;
}
else { /* tile window */
if(i == 1) {
ny = way;
nx += mw;
}
nw = waw - mw - 2 * c->border;
if(i + 1 == n) /* remainder */
nh = (way + wah) - ny - 2 * c->border;
else
nh = th - 2 * c->border;
}
resize(c, nx, ny, nw, nh, False);
if(n > 1 && th != wah)
ny += nh + 2 * c->border;
i++;
} }
else { /* tile window */
if(i == 1) {
ny = way;
nx += mw;
}
nw = waw - mw - 2 * c->border;
if(i + 1 == n) /* remainder */
nh = (way + wah) - ny - 2 * c->border;
else
nh = th - 2 * c->border;
}
resize(c, nx, ny, nw, nh, False);
if(n > 1 && th != wah)
ny += nh + 2 * c->border;
i++;
}
} }
void void