Xinqi Bao's Git
1 /* See LICENSE file for copyright and license details. */
7 static double mwfact
= MWFACT
;
12 addtomwfact(const char *arg
) {
18 /* arg handling, manipulate mwfact */
21 else if(1 == sscanf(arg
, "%lf", &delta
)) {
22 if(delta
+ mwfact
> 0.1 && delta
+ mwfact
< 0.9)
30 unsigned int i
, n
, nx
, ny
, nw
, nh
, mw
, th
;
33 for(n
= 0, c
= nexttiled(clients
); c
; c
= nexttiled(c
->next
))
37 mw
= (n
== 1) ? waw
: mwfact
* waw
;
38 th
= (n
> 1) ? wah
/ (n
- 1) : 0;
44 for(i
= 0, c
= nexttiled(clients
); c
; c
= nexttiled(c
->next
)) {
46 if(i
== 0) { /* master */
47 nw
= mw
- 2 * c
->border
;
48 nh
= wah
- 2 * c
->border
;
50 else { /* tile window */
55 nw
= waw
- mw
- 2 * c
->border
;
56 if(i
+ 1 == n
) /* remainder */
57 nh
= (way
+ wah
) - ny
- 2 * c
->border
;
59 nh
= th
- 2 * c
->border
;
61 resize(c
, nx
, ny
, nw
, nh
, False
);
62 if(n
> 1 && th
!= wah
)
63 ny
+= nh
+ 2 * c
->border
;
69 zoom(const char *arg
) {
72 if(!sel
|| !isarrange(tile
) || sel
->isfloating
)
74 if((c
= sel
) == nexttiled(clients
))
75 if(!(c
= nexttiled(c
->next
)))