From 93f601ca5cd433d0d028f33c606dbc3613b009c4 Mon Sep 17 00:00:00 2001 From: Ottatop Date: Thu, 14 Dec 2023 16:43:04 -0600 Subject: [PATCH] Fix prev commit not removing xwayland windows properly --- src/handlers/xwayland.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/handlers/xwayland.rs b/src/handlers/xwayland.rs index f13a87d..dad2697 100644 --- a/src/handlers/xwayland.rs +++ b/src/handlers/xwayland.rs @@ -213,7 +213,12 @@ impl XwmHandler for CalloopData { if let Some(win) = win { tracing::debug!("removing x11 window from windows"); - self.state.windows.retain(|elem| &win != elem); + + // INFO: comparing the windows doesn't work so wlsurface it is + // self.state.windows.retain(|elem| &win != elem); + self.state + .windows + .retain(|elem| win.wl_surface() != elem.wl_surface()); if let Some(output) = win.output(&self.state) { self.state.update_windows(&output);