summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clients/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/clients/mod.rs b/src/clients/mod.rs
index 6152be5..e3da079 100644
--- a/src/clients/mod.rs
+++ b/src/clients/mod.rs
@@ -170,6 +170,7 @@ impl ClientState {
tag = c.tag;
}
}
+ let is_visible = self.focused_mon().focused_tag.matches(tag);
let new_idx = self.clients.len();
self.clients.push(Client::new(window, tag));
@@ -220,8 +221,9 @@ impl ClientState {
data: &[window],
});
- self.rearrange(conn);
- if self.focused_mon().focused_tag.matches(tag) {
+ if is_visible {
+ c.ensure_mapped(conn);
+ self.rearrange(conn);
self.refocus(conn, self.clients.len() - 1);
}
}