summaryrefslogtreecommitdiffhomepage
path: root/patch/bstackhoriz.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-07-15 08:57:30 +0200
committerbakkeby <[email protected]>2020-07-15 08:57:30 +0200
commit903b32ac8b4a69b37981874f23b15a9f65f2a20d (patch)
treeb7aff3bdd522721a03cbfdaea8adf15fefd90463 /patch/bstackhoriz.c
parent1584a32063cd252ec726dd18747c5f91f12f8be9 (diff)
downloaddwm-flexipatch-903b32ac8b4a69b37981874f23b15a9f65f2a20d.tar.gz
dwm-flexipatch-903b32ac8b4a69b37981874f23b15a9f65f2a20d.zip
Major refactoring in preparation for bar modules
Diffstat (limited to 'patch/bstackhoriz.c')
-rw-r--r--patch/bstackhoriz.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/patch/bstackhoriz.c b/patch/bstackhoriz.c
deleted file mode 100644
index 0f9042f..0000000
--- a/patch/bstackhoriz.c
+++ /dev/null
@@ -1,76 +0,0 @@
-static void
-bstackhoriz(Monitor *m)
-{
- unsigned int i, n;
- int mx = 0, my = 0, mh = 0, mw = 0;
- int sx = 0, sy = 0, sh = 0, sw = 0;
- float mfacts, sfacts;
- int mrest, srest;
- Client *c;
-
- #if VANITYGAPS_PATCH
- int oh, ov, ih, iv;
- getgaps(m, &oh, &ov, &ih, &iv, &n);
- #else
- for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
- #endif // VANITYGAPS_PATCH
-
- if (n == 0)
- return;
-
- #if VANITYGAPS_PATCH
- sx = mx = m->wx + ov;
- sy = my = m->wy + oh;
- mh = m->wh - 2*oh;
- sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
- mw = m->ww - 2*ov - iv * (MIN(n, m->nmaster) - 1);
- sw = m->ww - 2*ov;
-
- if (m->nmaster && n > m->nmaster) {
- sh = (mh - ih) * (1 - m->mfact);
- mh = (mh - ih) * m->mfact;
- sy = my + mh + ih;
- sh = m->wh - mh - 2*oh - ih * (n - m->nmaster);
- }
- #else
- sx = mx = m->wx;
- sy = my = m->wy;
- sh = mh = m->wh;
- sw = mw = m->ww;
-
- if (m->nmaster && n > m->nmaster) {
- sh = mh * (1 - m->mfact);
- mh = mh * m->mfact;
- sy = my + mh;
- sh = m->wh - mh;
- }
- #endif // VANITYGAPS_PATCH
-
- getfacts(m, mw, sh, &mfacts, &sfacts, &mrest, &srest);
-
- for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
- if (i < m->nmaster) {
- #if CFACTS_PATCH
- resize(c, mx, my, (mw / mfacts) * c->cfact + (i < mrest ? 1 : 0) - (2*c->bw), mh - (2*c->bw), 0);
- #else
- resize(c, mx, my, (mw / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), mh - (2*c->bw), 0);
- #endif // CFACTS_PATCH
- #if VANITYGAPS_PATCH
- mx += WIDTH(c) + iv;
- #else
- mx += WIDTH(c);
- #endif
- } else {
- #if CFACTS_PATCH
- resize(c, sx, sy, sw - (2*c->bw), (sh / sfacts) * c->cfact + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0);
- #else
- resize(c, sx, sy, sw - (2*c->bw), (sh / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0);
- #endif // CFACTS_PATCH
- #if VANITYGAPS_PATCH
- sy += HEIGHT(c) + ih;
- #else
- sy += HEIGHT(c);
- #endif
- }
- }
-} \ No newline at end of file