Xinqi Bao's Git
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
);
8 void tileresize(Client
*c
, int x
, int y
, int w
, int h
);
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
;
69 /* master area geometry */
75 /* tile area geometry */
83 tileresize(Client
*c
, int x
, int y
, int w
, int h
) {
84 resize(c
, x
, y
, w
, h
, RESIZEHINTS
);
85 if((RESIZEHINTS
) && ((c
->h
< bh
) || (c
->h
> h
) || (c
->w
< bh
) || (c
->w
> w
)))
86 /* client doesn't accept size constraints */
87 resize(c
, x
, y
, w
, h
, False
);
91 zoom(const char *arg
) {
94 if(c
== nextunfloating(clients
))
95 if(!c
|| !(c
= nextunfloating(c
->next
)))
97 if(lt
->arrange
== tile
&& !sel
->isfloating
) {