aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2025-04-14 23:13:43 -0400
committerGitHub <noreply@github.com>2025-04-14 23:13:43 -0400
commit1eb83ea61605d41d46f061dac8e0827c4cc7df8c (patch)
tree3f6823d1b406fe37e60b3fa5571ad1426066f822
parentc9489ca04fa4b5462e788f55df33cbbc0e911db0 (diff)
downloadservo-jdm-patch-54.tar.gz
servo-jdm-patch-54.zip
Force the event loop to spin when polling.jdm-patch-54
Signed-off-by: Josh Matthews <josh@joshmatthews.net>
-rw-r--r--ports/servoshell/desktop/app.rs6
1 files changed, 6 insertions, 0 deletions
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<WakerEvent> 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<WakerEvent> 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.