summaryrefslogtreecommitdiff
path: root/src/clients/mod.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-09-13 13:26:35 +0100
committertcmal <me@aria.rip>2024-09-13 13:48:57 +0100
commit31be28a8338a494a1932cb215a4aec5f31440f16 (patch)
tree530f2074fb25addc64da3a3c61a34c3b127fe248 /src/clients/mod.rs
parent1c3e83df5595b173d3421172a8bc343601ca4ddf (diff)
Ensure visible windows are mapped immediately on requestHEADmain
Diffstat (limited to 'src/clients/mod.rs')
-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);
}
}