diff --git a/winit/src/lib.rs b/winit/src/lib.rs index 73f22aa2..57b5a6a1 100644 --- a/winit/src/lib.rs +++ b/winit/src/lib.rs @@ -878,7 +878,20 @@ async fn run_instance

( caches, )); + let mut has_window_resized = false; + for action in actions { + has_window_resized = has_window_resized + || matches!( + action, + Action::Window( + runtime::window::Action::Resize( + _, + _ + ) + ) + ); + run_action( action, &program, @@ -905,6 +918,11 @@ async fn run_instance

( window = window_manager.get_mut(id).unwrap(); interface = user_interfaces.get_mut(&id).unwrap(); + + if has_window_resized { + window.raw.request_redraw(); + continue 'next_event; + } } };