1 /* See LICENSE file for copyright and license details. */
3 int bx, by, bw, bh, blw, mx, my, mw, mh, tx, ty, tw, th, wx, wy, ww, wh;
5 void setmfact(const char *arg);
7 void tileresize(Client *c, int x, int y, int w, int h);
8 void updatetilegeom(void);
11 setmfact(const char *arg) {
14 if(lt->arrange != tile)
19 d = strtod(arg, NULL);
20 if(arg[0] == '-' || arg[0] == '+')
22 if(d < 0.1 || d > 0.9)
36 for(n = 0, c = nextunfloating(clients); c; c = nextunfloating(c->next), n++);
41 c = nextunfloating(clients);
44 tileresize(c, wx, wy, ww - 2 * c->bw, wh - 2 * c->bw);
46 tileresize(c, mx, my, mw - 2 * c->bw, mh - 2 * c->bw);
57 for(i = 0, c = nextunfloating(c->next); c; c = nextunfloating(c->next), i++) {
58 if(i + 1 == n) /* remainder */
59 tileresize(c, tx, y, tw - 2 * c->bw, (ty + th) - y - 2 * c->bw);
61 tileresize(c, tx, y, tw - 2 * c->bw, h - 2 * c->bw);
63 y = c->y + c->h + 2 * c->bw;
68 tileresize(Client *c, int x, int y, int w, int h) {
69 resize(c, x, y, w, h, RESIZEHINTS);
70 if((RESIZEHINTS) && ((c->h < bh) || (c->h > h) || (c->w < bh) || (c->w > w)))
71 /* client doesn't accept size constraints */
72 resize(c, x, y, w, h, False);
76 zoom(const char *arg) {
79 if(c == nextunfloating(clients))
80 if(!c || !(c = nextunfloating(c->next)))
82 if(lt->arrange == tile && !sel->isfloating) {
91 updatetilegeom(void) {
92 /* master area geometry */
98 /* tile area geometry */