From cdeab41621f600771fd9a7bb20376260d24f49c7 Mon Sep 17 00:00:00 2001 From: tcmal Date: Wed, 28 Aug 2024 18:14:51 +0100 Subject: Switch focus after switching workspace tag --- src/clients/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/clients/mod.rs b/src/clients/mod.rs index d093fb1..7216545 100644 --- a/src/clients/mod.rs +++ b/src/clients/mod.rs @@ -434,8 +434,10 @@ impl ClientState { debug!("setting tag focus to {:?} on mon {}", tag_focus, mon); self.mons[mon].last_focused_tag = curr_focus; self.mons[mon].focused_tag = tag_focus; - self.unfocus(conn); + self.rearrange_mon(conn, mon); + self.unfocus(conn); + self.focused_client = self.clients.iter().position(|c| tag_focus.matches(c.tag)); } /// Set the given monitor's focused tag to its previous value -- cgit v1.2.3