summaryrefslogtreecommitdiff
path: root/src/clients/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients/mod.rs')
-rw-r--r--src/clients/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/clients/mod.rs b/src/clients/mod.rs
index 70ffb00..d093fb1 100644
--- a/src/clients/mod.rs
+++ b/src/clients/mod.rs
@@ -432,11 +432,17 @@ impl ClientState {
.for_each(|c| c.ensure_unmapped(conn));
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);
}
+ /// Set the given monitor's focused tag to its previous value
+ pub fn mon_prev_tag_focus(&mut self, conn: &Connection<'_>, mon: MonitorIdx) {
+ self.set_mon_tag_focus(conn, mon, self.mons[mon].last_focused_tag);
+ }
+
/// Set the tag for the given client
pub fn set_client_tag(&mut self, conn: &Connection<'_>, pos: ClientIdx, tag: Tag) {
let c = self.client_mut(pos);