Mercurial > dwm-meillo
comparison view.c @ 682:76b58d21ea98 3.0
removing to allow nmaster=0
author | Anselm R. Garbe <arg@suckless.org> |
---|---|
date | Fri, 12 Jan 2007 12:15:06 +0100 |
parents | 4dcbbfe9d137 |
children | a76799907854 |
comparison
equal
deleted
inserted
replaced
681:335c93c666c7 | 682:76b58d21ea98 |
---|---|
73 unsigned int i, n, mw, mh, tw, th; | 73 unsigned int i, n, mw, mh, tw, th; |
74 Client *c; | 74 Client *c; |
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 |
89 for(i = 0, c = clients; c; c = c->next) | 84 for(i = 0, c = clients; c; c = c->next) |
90 if(isvisible(c)) { | 85 if(isvisible(c)) { |
93 continue; | 88 continue; |
94 } | 89 } |
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; |
102 } | 97 } |
103 else { /* tile window */ | 98 else { /* tile window */ |
153 } | 148 } |
154 } | 149 } |
155 | 150 |
156 void | 151 void |
157 incnmaster(Arg *arg) { | 152 incnmaster(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(); |
164 if(sel) | 157 if(sel) |
165 arrange(); | 158 arrange(); |