From 1eb83ea61605d41d46f061dac8e0827c4cc7df8c Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 14 Apr 2025 23:13:43 -0400 Subject: Force the event loop to spin when polling. Signed-off-by: Josh Matthews --- ports/servoshell/desktop/app.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ports/servoshell/desktop/app.rs b/ports/servoshell/desktop/app.rs index 880178aaff8..48e05a62120 100644 --- a/ports/servoshell/desktop/app.rs +++ b/ports/servoshell/desktop/app.rs @@ -395,6 +395,9 @@ impl ApplicationHandler for App { event_loop.set_control_flow(ControlFlow::Wait); } else { event_loop.set_control_flow(ControlFlow::Poll); + // Even when using polling, we still need to ensure there's an event in the queue + // that will make us spin the event loop. + window.winit_window().unwrap().request_redraw(); } // Consume and handle any events from the servoshell UI. @@ -427,6 +430,9 @@ impl ApplicationHandler for App { event_loop.set_control_flow(ControlFlow::Wait); } else { event_loop.set_control_flow(ControlFlow::Poll); + // Even when using polling, we still need to ensure there's an event in the queue + // that will make us spin the event loop. + window.winit_window().unwrap().request_redraw(); } // Consume and handle any events from the Minibrowser. -- cgit v1.2.3