1 static void bstack(void)
3 unsigned int i
, n
, nx
, ny
, nw
, nh
, m
, mw
, mh
, tw
;
6 for (n
= 0, c
= nextvisible(clients
); c
; c
= nextvisible(c
->next
))
10 m
= MAX(1, MIN(n
, screen
.nmaster
));
11 mh
= n
== m
? wah
: screen
.mfact
* wah
;
13 tw
= n
== m
? 0 : waw
/ (n
- m
);
17 for (i
= 0, c
= nextvisible(clients
); c
; c
= nextvisible(c
->next
)) {
20 if (i
< m
) { /* master */
22 mvvline(ny
, nx
, ACS_VLINE
, nh
);
23 mvaddch(ny
, nx
, ACS_TTEE
);
27 nw
= (i
< m
- 1) ? mw
: (wax
+ waw
) - nx
;
28 } else { /* tile window */
32 nh
= (way
+ wah
) - ny
;
35 mvvline(ny
, nx
, ACS_VLINE
, nh
);
36 mvaddch(ny
, nx
, ACS_TTEE
);
39 nw
= (i
< n
- 1) ? tw
: (wax
+ waw
) - nx
;
41 resize(c
, nx
, ny
, nw
, nh
);
46 /* Fill in nmaster intersections */
49 for (i
= 0; i
< m
; i
++) {
51 mvaddch(ny
, nx
, ACS_PLUS
);
54 nw
= (i
< m
- 1) ? mw
: (wax
+ waw
) - nx
;