Instruct editor to display same viewport
[dvtm.git] / vstack.c
blob6451febf045f65ad9f051a06ad4625324e216fa6
1 /* A vertical stack layout, all windows have the full screen width. */
2 static void vstack(void)
4 unsigned int i, n, ny, nh, mh, th;
5 Client *c;
7 for (n = 0, c = clients; c && !c->minimized; c = c->next, n++);
9 mh = n <= 1 ? wah : screen.mfact * wah;
10 th = n <= 1 ? 0 : (wah - mh) / (n - 1);
11 ny = way;
13 for (i = 0, c = clients; c && !c->minimized; c = c->next, i++) {
14 if (i == 0) /* master */
15 nh = mh;
16 else /* tile window */
17 nh = (i < n - 1) ? th : (way + wah) - ny;
18 resize(c, wax, ny, waw, nh);
19 ny += nh;