[dwm] Bug fixes for swallow

This commit is contained in:
dogeystamp 2022-05-01 11:29:19 -04:00 committed by dogeystamp
parent 97747aae7c
commit bf27dd9eb9

View File

@ -474,6 +474,7 @@ swallow(Client *p, Client *c)
detach(p); detach(p);
detachstack(p); detachstack(p);
c->swallowing = p; c->swallowing = p;
p->mon = c->mon;
} else { } else {
detach(c); detach(c);
detachstack(c); detachstack(c);
@ -483,8 +484,6 @@ swallow(Client *p, Client *c)
c->win = w; c->win = w;
} }
c->mon = p->mon;
updatetitle(p); updatetitle(p);
XMoveResizeWindow(dpy, p->win, p->x, p->y, p->w, p->h); XMoveResizeWindow(dpy, p->win, p->x, p->y, p->w, p->h);
arrange(p->mon); arrange(p->mon);
@ -503,6 +502,7 @@ unswallow(Client *c)
c->next = old.next; c->next = old.next;
c->snext = old.snext; c->snext = old.snext;
c->mon = old.mon; c->mon = old.mon;
c->tags = old.tags;
} }
else else
c->win = c->swallowing->win; c->win = c->swallowing->win;