From 7b657cf04dafb6e046e041184d88dbf8802f0d15 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Fri, 4 Nov 2022 09:41:38 -0600 Subject: fix tabbed monocle errors --- dwm.c | 81 +------------------------------------------------------------------ 1 file changed, 1 insertion(+), 80 deletions(-) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index 8c86eb1..9480e56 100644 --- a/dwm.c +++ b/dwm.c @@ -128,7 +128,6 @@ struct Monitor { unsigned int sellt; unsigned int tagset[2]; int showbar; - int showtab; int topbar; int toptab; Client *clients; @@ -182,7 +181,6 @@ static void focus(Client *c); static void focusin(XEvent *e); static void focusmon(const Arg *arg); static void focusstack(const Arg *arg); -static void focuswin(const Arg* arg); static Atom getatomprop(Client *c, Atom prop); static int getrootptr(int *x, int *y); static long getstate(Window w); @@ -222,7 +220,6 @@ static void seturgent(Client *c, int urg); static void showhide(Client *c); static void sigchld(int unused); static void spawn(const Arg *arg); -static void tabmode(const Arg *arg); static void tag(const Arg *arg); static void tagmon(const Arg *arg); static void tile(Monitor *); @@ -250,8 +247,6 @@ static int xerror(Display *dpy, XErrorEvent *ee); static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); -static void bstack(Monitor *m); -static void bstackhoriz(Monitor *m); /* variables */ static const char broken[] = "broken"; @@ -686,7 +681,6 @@ createmon(void) m->mfact = mfact; m->nmaster = nmaster; m->showbar = showbar; - m->showtab = showtab; m->topbar = topbar; m->gappx = gappx; m->lt[0] = &layouts[0]; @@ -1905,17 +1899,6 @@ togglebar(const Arg *arg) arrange(selmon); } -void -tabmode(const Arg *arg) -{ - if(arg && arg->i >= 0) - selmon->showtab = arg->ui % showtab_nmodes; - else - selmon->showtab = (selmon->showtab + 1 ) % showtab_nmodes; - arrange(selmon); -} - - void togglefloating(const Arg *arg) { @@ -2057,8 +2040,7 @@ updatebarpos(Monitor *m) if(ISVISIBLE(c)) ++nvis; } - if(m->showtab == showtab_always - || ((m->showtab == showtab_auto) && (nvis > 1) && (m->lt[m->sellt]->arrange == monocle))) { + if((nvis > 1) && (m->lt[m->sellt]->arrange == monocle)) { m->wh -= th; m->ty = m->toptab ? m->wy : m->wy + m->wh; if ( m->toptab ) @@ -2384,64 +2366,3 @@ main(int argc, char *argv[]) return EXIT_SUCCESS; } -static void -bstack(Monitor *m) { - int w, h, mh, mx, tx, ty, tw; - unsigned int i, n; - Client *c; - - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); - if (n == 0) - return; - if (n > m->nmaster) { - mh = m->nmaster ? m->mfact * m->wh : 0; - tw = m->ww / (n - m->nmaster); - ty = m->wy + mh; - } else { - mh = m->wh; - tw = m->ww; - ty = m->wy; - } - for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { - if (i < m->nmaster) { - w = (m->ww - mx) / (MIN(n, m->nmaster) - i); - resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0); - mx += WIDTH(c); - } else { - h = m->wh - mh; - resize(c, tx, ty, tw - (2 * c->bw), h - (2 * c->bw), 0); - if (tw != m->ww) - tx += WIDTH(c); - } - } -} - -static void -bstackhoriz(Monitor *m) { - int w, mh, mx, tx, ty, th; - unsigned int i, n; - Client *c; - - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); - if (n == 0) - return; - if (n > m->nmaster) { - mh = m->nmaster ? m->mfact * m->wh : 0; - th = (m->wh - mh) / (n - m->nmaster); - ty = m->wy + mh; - } else { - th = mh = m->wh; - ty = m->wy; - } - for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) { - if (i < m->nmaster) { - w = (m->ww - mx) / (MIN(n, m->nmaster) - i); - resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0); - mx += WIDTH(c); - } else { - resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), 0); - if (th != m->wh) - ty += HEIGHT(c); - } - } -} -- cgit v1.2.3