swallow: arrange monitor if window is not swallowed

This commit is contained in:
bakkeby 2020-09-12 14:21:51 +02:00
parent 7b477bc7db
commit 819d06c5c9
3 changed files with 7 additions and 7 deletions

4
dwm.c
View File

@ -2214,9 +2214,7 @@ manage(Window w, XWindowAttributes *wa)
XMapWindow(dpy, c->win);
#endif // BAR_WINTITLEACTIONS_PATCH
#if SWALLOW_PATCH
if (term)
swallow(term, c);
else
if (!(term && swallow(term, c)))
arrange(c->mon);
#else
arrange(c->mon);

View File

@ -8,15 +8,15 @@
static int scanner;
static xcb_connection_t *xcon;
void
int
swallow(Client *p, Client *c)
{
Client *s;
if (c->noswallow > 0 || c->isterminal)
return;
return 0;
if (c->noswallow < 0 && !swallowfloating && c->isfloating)
return;
return 0;
detach(c);
detachstack(c);
@ -40,6 +40,8 @@ swallow(Client *p, Client *c)
arrange(p->mon);
configure(p);
updateclientlist();
return 1;
}
void

View File

@ -1,6 +1,6 @@
static pid_t getparentprocess(pid_t p);
static int isdescprocess(pid_t p, pid_t c);
static void swallow(Client *p, Client *c);
static int swallow(Client *p, Client *c);
static Client *swallowingclient(Window w);
static Client *termforwin(const Client *c);
static void unswallow(Client *c);