From 5ee62daed7e4fb60d09ba72793bf872307697203 Mon Sep 17 00:00:00 2001 From: wochap Date: Wed, 22 Nov 2023 20:42:20 -0500 Subject: [PATCH] fix focus after hiding --- dwl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dwl.c b/dwl.c index 83d771e..6b5d55d 100644 --- a/dwl.c +++ b/dwl.c @@ -2498,7 +2498,6 @@ void focusortogglescratch(const Arg *arg) { Client *c; - Client *cwithfocus; unsigned int found = 0; /* search for first window that matches the scratchkey */ @@ -2510,11 +2509,10 @@ focusortogglescratch(const Arg *arg) if (found) { if (VISIBLEON(c, selmon)) { - cwithfocus = focustop(selmon); - if (cwithfocus == c) { + if (focustop(selmon) == c) { // hide c->tags = 0; - focusclient(cwithfocus, 1); + focusclient(focustop(selmon), 1); } else { // focus focusclient(c, 1); -- 2.48.1