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 |
78 /* window geoms */ |
79 /* window geoms */ |
79 mw = (n > nmaster) ? (waw * master) / 1000 : waw; |
80 if(nmaster > 0) { |
80 mh = (n > nmaster) ? wah / nmaster : wah / (n > 0 ? n : 1); |
81 mh = (n > nmaster) ? wah / nmaster : wah / (n > 0 ? n : 1); |
|
82 mw = (n > nmaster) ? (waw * master) / 1000 : waw; |
|
83 } |
|
84 else |
|
85 mh = mw = 0; |
|
86 th = (n > nmaster) ? wah / (n - nmaster) : 0; |
81 tw = waw - mw; |
87 tw = waw - mw; |
82 th = (n > nmaster) ? wah / (n - nmaster) : 0; |
|
83 |
88 |
84 for(i = 0, c = clients; c; c = c->next) |
89 for(i = 0, c = clients; c; c = c->next) |
85 if(isvisible(c)) { |
90 if(isvisible(c)) { |
86 if(c->isfloat) { |
91 if(c->isfloat) { |
87 resize(c, True, TopLeft); |
92 resize(c, True, TopLeft); |
88 continue; |
93 continue; |
89 } |
94 } |
90 c->ismax = False; |
95 c->ismax = False; |
91 c->x = wax; |
96 c->x = wax; |
92 c->y = way; |
97 c->y = way; |
93 if(i < nmaster) { |
98 if((nmaster > 0) && (i < nmaster)) { |
94 c->y += i * mh; |
99 c->y += i * mh; |
95 c->w = mw - 2 * BORDERPX; |
100 c->w = mw - 2 * BORDERPX; |
96 c->h = mh - 2 * BORDERPX; |
101 c->h = mh - 2 * BORDERPX; |
97 } |
102 } |
98 else { /* tile window */ |
103 else { /* tile window */ |