summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dwm.c4
-rw-r--r--patch/swallow.c8
-rw-r--r--patch/swallow.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/dwm.c b/dwm.c
index 7d421d5..7f76a48 100644
--- a/dwm.c
+++ b/dwm.c
@@ -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);
diff --git a/patch/swallow.c b/patch/swallow.c
index 397c0e8..744eba3 100644
--- a/patch/swallow.c
+++ b/patch/swallow.c
@@ -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
diff --git a/patch/swallow.h b/patch/swallow.h
index 98ae7fb..d44a7ea 100644
--- a/patch/swallow.h
+++ b/patch/swallow.h
@@ -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);