aboutsummaryrefslogtreecommitdiff
path: root/tile.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-08-13 19:19:38 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-08-13 19:19:38 +0200
commita200c39635dcbd1cb1109353f9c2acab983c8606 (patch)
tree20c77de32cb8b8f91eee759bade3561ac2e4f7c1 /tile.c
parent77044e876511f51c34bde379d89e2de754707ee6 (diff)
downloaddwm-a200c39635dcbd1cb1109353f9c2acab983c8606.tar
dwm-a200c39635dcbd1cb1109353f9c2acab983c8606.tar.gz
dwm-a200c39635dcbd1cb1109353f9c2acab983c8606.tar.bz2
made tile simplier
Diffstat (limited to 'tile.c')
-rw-r--r--tile.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/tile.c b/tile.c
index d03e4fa..b7cc100 100644
--- a/tile.c
+++ b/tile.c
@@ -39,31 +39,28 @@ tile(void) {
nx = wax;
ny = way;
- for(i = 0, c = clients; c; c = c->next)
- if(isvisible(c)) {
- if(c->isfloating)
- continue;
- c->ismax = False;
- 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;
+ for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) {
+ c->ismax = False;
+ if(i == 0) { /* master */
+ nw = mw - 2 * c->border;
+ nh = wah - 2 * c->border;
+ }
+ else { /* tile window */
+ if(i == 1) {
+ ny = way;
+ nx += mw;
}
- resize(c, nx, ny, nw, nh, False);
- if(n > 1 && th != wah)
- ny += nh + 2 * c->border;
- i++;
+ 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