Handle toplevel info updates

This commit is contained in:
Ian Douglas Scott 2023-02-10 13:41:08 -08:00
parent b5931cd240
commit 4ca7c9fb56
4 changed files with 17 additions and 3 deletions

View file

@ -329,6 +329,13 @@ impl Application for App {
img: None,
});
}
wayland::Event::UpdateToplevel(handle, info) => {
if let Some(toplevel) =
self.toplevels.iter_mut().find(|x| x.handle == handle)
{
toplevel.info = info;
}
}
wayland::Event::CloseToplevel(handle) => {
if let Some(idx) = self.toplevels.iter().position(|x| x.handle == handle) {
self.toplevels.remove(idx);
@ -341,7 +348,7 @@ impl Application for App {
}
wayland::Event::ToplevelCapture(handle, image) => {
if let Some(toplevel) = self.toplevel_for_handle_mut(&handle) {
println!("Got toplevel image!");
//println!("Got toplevel image!");
toplevel.img = Some(image);
}
}