summaryrefslogtreecommitdiffstats
path: root/tile.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-08-13 19:13:54 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-08-13 19:13:54 +0200
commit77044e876511f51c34bde379d89e2de754707ee6 (patch)
tree6626665e0d57068c2d6ddbb3669534f2afb4e159 /tile.c
parentmade resize more precise (diff)
downloaddwm-77044e876511f51c34bde379d89e2de754707ee6.tar.gz
dwm-77044e876511f51c34bde379d89e2de754707ee6.zip
made Layout a static struct in layout.c, added some convenience getters in layout.c, now lt->arrange accesses are not possible anymore, arrange() is the super-arrange function which sets up all layouts
Diffstat (limited to 'tile.c')
-rw-r--r--tile.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/tile.c b/tile.c
index 2481eb3..d03e4fa 100644
--- a/tile.c
+++ b/tile.c
@@ -12,7 +12,7 @@ void
12addtomwfact(const char *arg) { 12addtomwfact(const char *arg) {
13 double delta; 13 double delta;
14 14
15 if(lt->arrange != tile) 15 if(isarrange(tile))
16 return; 16 return;
17 17
18 /* arg handling, manipulate mwfact */ 18 /* arg handling, manipulate mwfact */
@@ -20,7 +20,7 @@ addtomwfact(const char *arg) {
20 if(delta + mwfact > 0.1 && delta + mwfact < 0.9) 20 if(delta + mwfact > 0.1 && delta + mwfact < 0.9)
21 mwfact += delta; 21 mwfact += delta;
22 } 22 }
23 lt->arrange(); 23 arrange();
24} 24}
25 25
26void 26void
@@ -41,7 +41,6 @@ tile(void) {
41 ny = way; 41 ny = way;
42 for(i = 0, c = clients; c; c = c->next) 42 for(i = 0, c = clients; c; c = c->next)
43 if(isvisible(c)) { 43 if(isvisible(c)) {
44 unban(c);
45 if(c->isfloating) 44 if(c->isfloating)
46 continue; 45 continue;
47 c->ismax = False; 46 c->ismax = False;
@@ -65,17 +64,13 @@ tile(void) {
65 ny += nh + 2 * c->border; 64 ny += nh + 2 * c->border;
66 i++; 65 i++;
67 } 66 }
68 else
69 ban(c);
70 focus(NULL);
71 restack();
72} 67}
73 68
74void 69void
75zoom(const char *arg) { 70zoom(const char *arg) {
76 Client *c; 71 Client *c;
77 72
78 if(!sel || lt->arrange == floating || sel->isfloating) 73 if(!sel || !isarrange(tile) || sel->isfloating)
79 return; 74 return;
80 if((c = sel) == nexttiled(clients)) 75 if((c = sel) == nexttiled(clients))
81 if(!(c = nexttiled(c->next))) 76 if(!(c = nexttiled(c->next)))
@@ -83,5 +78,5 @@ zoom(const char *arg) {
83 detach(c); 78 detach(c);
84 attach(c); 79 attach(c);
85 focus(c); 80 focus(c);
86 lt->arrange(); 81 arrange();
87} 82}