summaryrefslogtreecommitdiffstats
path: root/glutin/src/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'glutin/src/application.rs')
-rw-r--r--glutin/src/application.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/glutin/src/application.rs b/glutin/src/application.rs
index a3cef829..3bb9e61a 100644
--- a/glutin/src/application.rs
+++ b/glutin/src/application.rs
@@ -270,6 +270,7 @@ async fn run_instance<A, E, C>(
redraw_pending = matches!(
start_cause,
event::StartCause::Init
+ | event::StartCause::Poll
| event::StartCause::ResumeTimeReached { .. }
);
}
@@ -379,8 +380,15 @@ async fn run_instance<A, E, C>(
let _ = control_sender.start_send(match interface_state {
user_interface::State::Updated {
- redraw_requested_at: Some(at),
- } => ControlFlow::WaitUntil(at),
+ redraw_request: Some(redraw_request),
+ } => match redraw_request {
+ crate::window::RedrawRequest::NextFrame => {
+ ControlFlow::Poll
+ }
+ crate::window::RedrawRequest::At(at) => {
+ ControlFlow::WaitUntil(at)
+ }
+ },
_ => ControlFlow::Wait,
});