Xinqi Bao's Git
1 /* See LICENSE file for copyright and license details. */
2 int bx
, by
, bw
, bh
, blw
, mx
, my
, mw
, mh
, tx
, ty
, tw
, th
, wx
, wy
, ww
, wh
;
4 void setmfact(const char *arg
);
6 void tileresize(Client
*c
, int x
, int y
, int w
, int h
);
7 void updatetilegeom(void);
10 setmfact(const char *arg
) {
13 if(!arg
|| lt
->arrange
!= tile
)
16 d
= strtod(arg
, NULL
);
17 if(arg
[0] == '-' || arg
[0] == '+')
19 if(d
< 0.1 || d
> 0.9)
33 for(n
= 0, c
= nextunfloating(clients
); c
; c
= nextunfloating(c
->next
), n
++);
38 c
= nextunfloating(clients
);
41 tileresize(c
, wx
, wy
, ww
- 2 * c
->bw
, wh
- 2 * c
->bw
);
43 tileresize(c
, mx
, my
, mw
- 2 * c
->bw
, mh
- 2 * c
->bw
);
54 for(i
= 0, c
= nextunfloating(c
->next
); c
; c
= nextunfloating(c
->next
), i
++) {
55 if(i
+ 1 == n
) /* remainder */
56 tileresize(c
, tx
, y
, tw
- 2 * c
->bw
, (ty
+ th
) - y
- 2 * c
->bw
);
58 tileresize(c
, tx
, y
, tw
- 2 * c
->bw
, h
- 2 * c
->bw
);
60 y
= c
->y
+ c
->h
+ 2 * c
->bw
;
65 tileresize(Client
*c
, int x
, int y
, int w
, int h
) {
66 resize(c
, x
, y
, w
, h
, resizehints
);
67 if(resizehints
&& ((c
->h
< bh
) || (c
->h
> h
) || (c
->w
< bh
) || (c
->w
> w
)))
68 /* client doesn't accept size constraints */
69 resize(c
, x
, y
, w
, h
, False
);
73 zoom(const char *arg
) {
76 if(c
== nextunfloating(clients
))
77 if(!c
|| !(c
= nextunfloating(c
->next
)))
79 if(lt
->arrange
== tile
&& !sel
->isfloating
) {
88 updatetilegeom(void) {
89 #ifdef TILEGEOM /* define your own if you are Xinerama user */
92 /* master area geometry */
98 /* tile area geometry */