From d05ad311a9564d6abe22f869809fd8704691563a Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 19 Sep 2025 12:41:57 +0300 Subject: [PATCH] wayland: remove closed toplevels on event Signed-off-by: NotAShelf Change-Id: I6a6a69644f5e067b3533a7f62c42d4a6d01be00b --- src/wayland/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wayland/mod.rs b/src/wayland/mod.rs index acc449c..425d5ab 100644 --- a/src/wayland/mod.rs +++ b/src/wayland/mod.rs @@ -163,6 +163,12 @@ impl Dispatch for AppState { } } }, + zwlr_foreign_toplevel_handle_v1::Event::Closed => { + // Clean up when toplevel is closed + if let Ok(mut apps) = TOPLEVEL_APPS.lock() { + apps.remove(&handle_id); + } + }, _ => {}, } }