summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@suckless.org>2007-01-12 12:15:06 +0100
committerAnselm R. Garbe <arg@suckless.org>2007-01-12 12:15:06 +0100
commitf679125206ae28b38f77e9620a67365d310ddff3 (patch)
treed2c501ee6b8c646711d86aac23fa0017df16525a
parentthis looks better now ;) (diff)
downloaddwm-f679125206ae28b38f77e9620a67365d310ddff3.tar.gz
dwm-f679125206ae28b38f77e9620a67365d310ddff3.zip
removing to allow nmaster=0
Diffstat (limited to '')
-rw-r--r--view.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/view.c b/view.c
index 4513a45..4e2ffb3 100644
--- a/view.c
+++ b/view.c
@@ -75,14 +75,9 @@ dotile(void) {
75 75
76 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) 76 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
77 n++; 77 n++;
78
79 /* window geoms */ 78 /* window geoms */
80 if(nmaster > 0) { 79 mh = (n > nmaster) ? wah / nmaster : wah / (n > 0 ? n : 1);
81 mh = (n > nmaster) ? wah / nmaster : wah / (n > 0 ? n : 1); 80 mw = (n > nmaster) ? (waw * master) / 1000 : waw;
82 mw = (n > nmaster) ? (waw * master) / 1000 : waw;
83 }
84 else
85 mh = mw = 0;
86 th = (n > nmaster) ? wah / (n - nmaster) : 0; 81 th = (n > nmaster) ? wah / (n - nmaster) : 0;
87 tw = waw - mw; 82 tw = waw - mw;
88 83
@@ -95,7 +90,7 @@ dotile(void) {
95 c->ismax = False; 90 c->ismax = False;
96 c->x = wax; 91 c->x = wax;
97 c->y = way; 92 c->y = way;
98 if((nmaster > 0) && (i < nmaster)) { 93 if(i < nmaster) {
99 c->y += i * mh; 94 c->y += i * mh;
100 c->w = mw - 2 * BORDERPX; 95 c->w = mw - 2 * BORDERPX;
101 c->h = mh - 2 * BORDERPX; 96 c->h = mh - 2 * BORDERPX;
@@ -155,9 +150,7 @@ focusprev(Arg *arg) {
155 150
156void 151void
157incnmaster(Arg *arg) { 152incnmaster(Arg *arg) {
158 if((arrange == dofloat) 153 if((arrange == dofloat) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) < bh))
159 || ((int)nmaster + arg->i < 0)
160 || (((int)nmaster + arg->i > 0) && (wah / (nmaster + arg->i) < bh)))
161 return; 154 return;
162 nmaster += arg->i; 155 nmaster += arg->i;
163 updatemodetext(); 156 updatemodetext();