mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 13:50:05 -04:00
Fix unreachable panic after setting ControlFlow to Poll during some RedrawRequested events.
This commit is contained in:
@@ -400,7 +400,9 @@ impl<T> EventLoopRunner<T> {
|
|||||||
};
|
};
|
||||||
self.call_event_handler(Event::NewEvents(start_cause));
|
self.call_event_handler(Event::NewEvents(start_cause));
|
||||||
},
|
},
|
||||||
ControlFlow::Poll |
|
// This can be reached if the control flow is changed to poll during a `RedrawRequested`
|
||||||
|
// that was sent after `EventsCleared`.
|
||||||
|
ControlFlow::Poll => self.call_event_handler(Event::NewEvents(StartCause::Poll)),
|
||||||
ControlFlow::Exit => unreachable!()
|
ControlFlow::Exit => unreachable!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user