Refactor to prepare for follow-on change

This commit is contained in:
Hanno Braun 2024-05-06 14:10:50 +02:00
parent 80171239f2
commit c61c73e99a

View File

@ -42,7 +42,7 @@ pub fn display(model: Model, invert_zoom: bool) -> Result<(), Error> {
} }
if event == Event::AboutToWait { if event == Event::AboutToWait {
display_state.window.window().request_redraw(); display_state.about_to_wait(event_loop);
} }
})?; })?;
@ -150,6 +150,10 @@ impl DisplayState {
_ => {} _ => {}
} }
} }
fn about_to_wait(&mut self, _: &ActiveEventLoop) {
self.window.window().request_redraw();
}
} }
fn input_event( fn input_event(