mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 13:51:30 +11:00
Fix compiler warning of potential undefined behavior (#892)
This commit is contained in:
parent
08f8f89702
commit
0eefa3ba42
|
@ -844,13 +844,14 @@ unsafe extern "system" fn public_window_callback<T>(
|
|||
// 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 => {
|
||||
|
|
Loading…
Reference in a new issue