diff options
author | tcmal <me@aria.rip> | 2024-08-28 18:14:51 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-30 18:18:46 +0100 |
commit | cdeab41621f600771fd9a7bb20376260d24f49c7 (patch) | |
tree | 3d8e59e12ed89870dd23994bfdadc482fd99c761 /src/clients/mod.rs | |
parent | 184cbb73f61916b3dd14e40a10c5700ebb945dec (diff) |
Switch focus after switching workspace tag
Diffstat (limited to 'src/clients/mod.rs')
-rw-r--r-- | src/clients/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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 |