File tree Expand file tree Collapse file tree
rio-window/src/platform_impl/linux/wayland/event_loop Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -505,12 +505,18 @@ impl<T: 'static> EventLoop<T> {
505505 return None ;
506506 }
507507
508+ // Reset the frame-callback state so the window can accept a new
509+ // callback when the app commits (pre_present_notify).
510+ //
511+ // NOTE: don't call request_frame_callback here. It would call
512+ // wl_suface::frame() before we know wether a render will happen.
513+ // If this iteration emits no RedraRequested, the app never commits,
514+ // callback stay pending forever and the next itration sees
515+ // state == Requested and short-cirtuits above.
516+ // Freezing the loop until external events happen to work around it.
508517 let was_received =
509518 window. frame_callback_state ( ) == FrameCallbackState :: Received ;
510519 window. frame_callback_reset ( ) ;
511- if was_received {
512- window. request_frame_callback ( ) ;
513- }
514520
515521 let mut redraw_requested = window_requests
516522 . get ( window_id)
You can’t perform that action at this time.
0 commit comments