From e903cd99f4966a3b7039a400826b198828328a97 Mon Sep 17 00:00:00 2001 From: ShadowProgr <14125835+ShadowProgr@users.noreply.github.com> Date: Mon, 1 Jun 2026 08:52:34 +0700 Subject: [PATCH] docs: clarify smartkillclient kill fallback Add an inline comment on the fallback branch noting that the client is closed when it is single-tag, or when removing the viewed tag(s) would leave it on none. --- src/dispatch/bind_define.h | 2 ++ 1 file changed, 2 insertions(+) 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;