From 31be28a8338a494a1932cb215a4aec5f31440f16 Mon Sep 17 00:00:00 2001 From: tcmal Date: Fri, 13 Sep 2024 13:26:35 +0100 Subject: Ensure visible windows are mapped immediately on request --- src/clients/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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); } } -- cgit v1.2.3