summaryrefslogtreecommitdiffstats
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
parentmade Layout a static struct in layout.c, added some convenience getters in la... (diff)
downloaddwm-a200c39635dcbd1cb1109353f9c2acab983c8606.tar.gz
dwm-a200c39635dcbd1cb1109353f9c2acab983c8606.zip
made tile simplier
Diffstat (limited to '')
-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) {
39 39
40 nx = wax; 40 nx = wax;
41 ny = way; 41 ny = way;
42 for(i = 0, c = clients; c; c = c->next) 42 for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) {
43 if(isvisible(c)) { 43 c->ismax = False;
44 if(c->isfloating) 44 if(i == 0) { /* master */
45 continue; 45 nw = mw - 2 * c->border;
46 c->ismax = False; 46 nh = wah - 2 * c->border;
47 if(i == 0) { /* master */ 47 }
48 nw = mw - 2 * c->border; 48 else { /* tile window */
49 nh = wah - 2 * c->border; 49 if(i == 1) {
50 } 50 ny = way;
51 else { /* tile window */ 51 nx += mw;
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 } 52 }
62 resize(c, nx, ny, nw, nh, False); 53 nw = waw - mw - 2 * c->border;
63 if(n > 1 && th != wah) 54 if(i + 1 == n) /* remainder */
64 ny += nh + 2 * c->border; 55 nh = (way + wah) - ny - 2 * c->border;
65 i++; 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
69void 66void