Fix prev commit not removing xwayland windows properly

This commit is contained in:
Ottatop 2023-12-14 16:43:04 -06:00
parent b2ebda85f0
commit 93f601ca5c

View file

@ -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);