1 /* A vertical stack layout, all windows have the full screen width. */
2 static void vstack(void)
4 unsigned int i
, n
, ny
, nh
, m
, mh
, th
;
7 for (n
= 0, c
= nextvisible(clients
); c
; c
= nextvisible(c
->next
))
11 m
= MAX(1, MIN(n
, screen
.nmaster
));
12 mh
= (n
== m
? wah
: screen
.mfact
* wah
);
13 th
= n
== m
? 0 : (wah
- mh
) / (n
- m
);
16 for (i
= 0, c
= nextvisible(clients
); c
; c
= nextvisible(c
->next
)) {
19 if (i
< m
) /* master */
20 nh
= (i
< m
- 1) ? mh
/ m
: (way
+ mh
) - ny
;
21 else /* tile window */
22 nh
= (i
< n
- 1) ? th
: (way
+ wah
) - ny
;
23 resize(c
, wax
, ny
, waw
, nh
);