File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -544,6 +544,7 @@ impl ApplicationHandler for App {
544544 Err ( RenderError :: SurfaceError ( e) ) => tracing:: error!( "Render error: {:?}" , e) ,
545545 }
546546 let _ = self . start_render_sender . try_send ( ( ) ) ;
547+ // self.cef_context.schedule_frame();
547548 }
548549 }
549550 WindowEvent :: DragDropped { paths, .. } => {
@@ -612,7 +613,6 @@ impl ApplicationHandler for App {
612613 fn about_to_wait ( & mut self , event_loop : & dyn ActiveEventLoop ) {
613614 // Set a timeout in case we miss any cef schedule requests
614615 let timeout = Instant :: now ( ) + Duration :: from_millis ( 10 ) ;
615- let wait_until = timeout. min ( self . cef_schedule . unwrap_or ( timeout) ) ;
616616 if let Some ( schedule) = self . cef_schedule
617617 && schedule < Instant :: now ( )
618618 {
@@ -621,11 +621,9 @@ impl ApplicationHandler for App {
621621 for _ in 0 ..CEF_MESSAGE_LOOP_MAX_ITERATIONS {
622622 self . cef_context . work ( ) ;
623623 }
624+ } else {
625+ let wait_until = timeout. min ( self . cef_schedule . unwrap_or ( timeout) ) ;
626+ event_loop. set_control_flow ( ControlFlow :: WaitUntil ( wait_until) ) ;
624627 }
625- if let Some ( window) = & self . window . as_ref ( ) {
626- window. request_redraw ( ) ;
627- }
628-
629- event_loop. set_control_flow ( ControlFlow :: WaitUntil ( wait_until) ) ;
630628 }
631629}
You can’t perform that action at this time.
0 commit comments