1 /* See LICENSE file for copyright and license details. */
7 static double mwfact = MWFACT;
12 addtomwfact(const char *arg) {
15 if(lt->arrange != tile)
18 /* arg handling, manipulate mwfact */
19 if(arg && (1 == sscanf(arg, "%lf", &delta))) {
20 if(delta + mwfact > 0.1 && delta + mwfact < 0.9)
28 unsigned int i, n, nx, ny, nw, nh, mw, th;
31 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
35 mw = (n == 1) ? waw : mwfact * waw;
36 th = (n > 1) ? wah / (n - 1) : 0;
42 for(i = 0, c = clients; c; c = c->next)
48 if(i == 0) { /* master */
49 nw = mw - 2 * c->border;
50 nh = wah - 2 * c->border;
52 else { /* tile window */
57 nw = waw - mw - 2 * c->border;
58 if(i + 1 == n) /* remainder */
59 nh = (way + wah) - ny - 2 * c->border;
61 nh = th - 2 * c->border;
63 resize(c, nx, ny, nw, nh, False);
64 if(n > 1 && th != wah)
65 ny += nh + 2 * c->border;
75 zoom(const char *arg) {
78 if(!sel || lt->arrange == floating || sel->isfloating)
80 if((c = sel) == nexttiled(clients))
81 if(!(c = nexttiled(c->next)))