diff --git a/anvil/src/window_map.rs b/anvil/src/window_map.rs index 9a8fd9f..c014626 100644 --- a/anvil/src/window_map.rs +++ b/anvil/src/window_map.rs @@ -237,6 +237,13 @@ where } } + /// Refreshes the state of the toplevel, if it exists. + pub fn refresh_toplevel(&mut self, toplevel: &Kind) { + if let Some(w) = self.windows.iter_mut().find(|w| w.toplevel.equals(toplevel)) { + w.self_update(self.ctoken); + } + } + pub fn clear(&mut self) { self.windows.clear(); }