1 /* See LICENSE file for copyright and license details. */
7 static double mwfact = MWFACT;
12 setmwfact(const char *arg) {
17 /* arg handling, manipulate mwfact */
20 else if(1 == sscanf(arg, "%lf", &delta)) {
21 if(arg[0] != '+' && arg[0] != '-')
35 unsigned int i, n, nx, ny, nw, nh, mw, th;
38 for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
42 mw = (n == 1) ? waw : mwfact * waw;
43 th = (n > 1) ? wah / (n - 1) : 0;
49 for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) {
51 if(i == 0) { /* master */
52 nw = mw - 2 * c->border;
53 nh = wah - 2 * c->border;
55 else { /* tile window */
60 nw = waw - mw - 2 * c->border;
61 if(i + 1 == n) /* remainder */
62 nh = (way + wah) - ny - 2 * c->border;
64 nh = th - 2 * c->border;
66 resize(c, nx, ny, nw, nh, False);
67 if(n > 1 && th != wah)
68 ny += nh + 2 * c->border;
74 zoom(const char *arg) {
77 if(!sel || !isarrange(tile) || sel->isfloating)
79 if((c = sel) == nexttiled(clients))
80 if(!(c = nexttiled(c->next)))