diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index 7fbde380..1d49060d 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -844,13 +844,14 @@ unsafe extern "system" fn public_window_callback( // spinning up a new event loop iteration. We do this because that's what the API // says to do. let control_flow = runner.control_flow; + let runner_state = runner.runner_state; let mut request_redraw = || { runner.call_event_handler(Event::WindowEvent { window_id: RootWindowId(WindowId(window)), event: RedrawRequested, }); }; - match runner.runner_state { + match runner_state { RunnerState::Idle(..) | RunnerState::DeferredNewEvents(..) => request_redraw(), RunnerState::HandlingEvents => {