Handle toplevel removal

This commit is contained in:
Ian Douglas Scott 2023-01-18 11:01:47 -08:00
parent 0226f20da1
commit 349a7f5a3e
2 changed files with 7 additions and 1 deletions

View file

@ -210,6 +210,11 @@ impl Application for App {
img: None,
});
}
wayland::Event::CloseToplevel(handle) => {
if let Some(idx) = self.toplevels.iter().position(|x| x.handle == handle) {
self.toplevels.remove(idx);
}
}
wayland::Event::WorkspaceCapture(handle, image) => {
if let Some(workspace) = self.workspace_for_handle_mut(&handle) {
workspace.img = Some(image.clone());