From 13190da417cd3a7d20c5da8d36664990c56adebd Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 6 Nov 2023 00:31:49 +0000 Subject: Temporarily disabled attachaside diff Using normal dwm mechanisms for now --- dwm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dwm.c b/dwm.c index aea6c67..84a5040 100644 --- a/dwm.c +++ b/dwm.c @@ -50,7 +50,8 @@ #define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \ * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy))) #define ISVISIBLEONTAG(C, T) ((C->tags & T)) -#define ISVISIBLE(C) ISVISIBLEONTAG(C, C->mon->tagset[C->mon->seltags]) +#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags])) +/* #define ISVISIBLE(C) ISVISIBLEONTAG(C, C->mon->tagset[C->mon->seltags]) */ #define LENGTH(X) (sizeof X / sizeof X[0]) #define MOUSEMASK (BUTTONMASK|PointerMotionMask) #define WIDTH(X) ((X)->w + 2 * (X)->bw) @@ -1162,7 +1163,8 @@ manage(Window w, XWindowAttributes *wa) c->isfloating = c->oldstate = trans != None || c->isfixed; if (c->isfloating) XRaiseWindow(dpy, c->win); - attachaside(c); + /* attachaside(c); */ + attach(c); attachstack(c); XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, (unsigned char *) &(c->win), 1); @@ -1527,7 +1529,8 @@ sendmon(Client *c, Monitor *m) detachstack(c); c->mon = m; c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */ - attachaside(c); + /* attachaside(c); */ + attach(c); attachstack(c); focus(NULL); arrange(NULL); @@ -1809,11 +1812,12 @@ tile(Monitor *m) mw = m->nmaster ? m->ww * m->mfact : 0; else mw = m->ww - m->gappx; - for (i = 0, my = ty = m->gappx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) if (i < m->nmaster) { + for (i = 0, my = ty = m->gappx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) + if (i < m->nmaster) { h = (m->wh - my) / (MIN(n, m->nmaster) - i) - m->gappx; resize(c, m->wx + m->gappx, m->wy + my, mw - (2*c->bw) - m->gappx, h - (2*c->bw), 0); if (my + HEIGHT(c) < m->wh) - my += HEIGHT(c) + m->gappx; + my += HEIGHT(c) + m->gappx; } else { h = (m->wh - ty) / (n - i) - m->gappx; resize(c, m->wx + mw + m->gappx, m->wy + ty, m->ww - mw - (2*c->bw) - 2*m->gappx, h - (2*c->bw), 0); -- cgit v1.2.3-13-gbd6f