Reuse input handler when reusing a view tree

This commit is contained in:
Antonio Scandurra 2024-01-11 13:22:59 +01:00
parent d088ace404
commit 50ccdf5c16
4 changed files with 67 additions and 29 deletions

View file

@ -167,8 +167,8 @@ impl PlatformWindow for TestWindow {
self.0.lock().input_handler = Some(input_handler);
}
fn clear_input_handler(&mut self) {
self.0.lock().input_handler = None;
fn take_input_handler(&mut self) -> Option<Box<dyn PlatformInputHandler>> {
self.0.lock().input_handler.take()
}
fn prompt(