diff --git a/src/dispatch/bind_define.h b/src/dispatch/bind_define.h index 3fd2d46a..34731b9f 100644 --- a/src/dispatch/bind_define.h +++ b/src/dispatch/bind_define.h @@ -366,6 +366,8 @@ int32_t smartkillclient(const Arg *arg) { return 0; uint32_t newtags = c->tags & ~(c->mon->tagset[c->mon->seltags] & TAGMASK); + // Kill the client if it's single-tag, or if removing the tag(s) would leave + // it on none if (__builtin_popcount(c->tags & TAGMASK) <= 1 || !newtags) { pending_kill_client(c); return 0;