wayland: remove closed toplevels on event

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a69644f5e067b3533a7f62c42d4a6d01be00b
This commit is contained in:
raf 2025-09-19 12:41:57 +03:00
commit d05ad311a9
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -163,6 +163,12 @@ impl Dispatch<ZwlrForeignToplevelHandleV1, ()> 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);
}
},
_ => {},
}
}