From f6a9f6b4ad139f46426ff308669b49a8dc25592e Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 17 Jul 2019 17:49:23 +0000 Subject: [PATCH] Use the right client for if -b. --- cmd-if-shell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd-if-shell.c b/cmd-if-shell.c index a992602c..2befbc0c 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -121,7 +121,10 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) cdata->cmd_else = NULL; memcpy(&cdata->mouse, m, sizeof cdata->mouse); - cdata->client = item->client; + if (!args_has(args, 'b')) + cdata->client = item->client; + else + cdata->client = c; if (cdata->client != NULL) cdata->client->references++;