File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -646,7 +646,7 @@ impl ApplicationHandler for App {
646646
647647 fn about_to_wait ( & mut self , event_loop : & dyn ActiveEventLoop ) {
648648 // Set a timeout in case we miss any cef schedule requests
649- let timeout = Instant :: now ( ) + Duration :: from_millis ( 10 ) ;
649+ let mut wait_until = Instant :: now ( ) + Duration :: from_millis ( 10 ) ;
650650 if let Some ( schedule) = self . cef_schedule
651651 && schedule < Instant :: now ( )
652652 {
@@ -655,10 +655,10 @@ impl ApplicationHandler for App {
655655 for _ in 0 ..CEF_MESSAGE_LOOP_MAX_ITERATIONS {
656656 self . cef_context . work ( ) ;
657657 }
658- } else {
659- let wait_until = timeout. min ( self . cef_schedule . unwrap_or ( timeout) ) ;
660- event_loop. set_control_flow ( ControlFlow :: WaitUntil ( wait_until) ) ;
658+ } else if let Some ( cef_schedule) = self . cef_schedule {
659+ wait_until = wait_until. min ( cef_schedule) ;
661660 }
661+ event_loop. set_control_flow ( ControlFlow :: WaitUntil ( wait_until) ) ;
662662 }
663663}
664664
You can’t perform that action at this time.
0 commit comments