fix: reset control flow if the loop is about to wait with nothing to do.

This commit is contained in:
Ashley Wulber 2025-04-10 13:48:50 -04:00
parent 53fed52405
commit ad0523230e
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -1295,6 +1295,8 @@ async fn run_instance<P>(
let skip = events.is_empty() && messages.is_empty();
if skip && window_manager.is_idle() {
_ = control_sender
.start_send(Control::ChangeFlow(ControlFlow::Wait));
continue;
}
@ -1415,6 +1417,8 @@ async fn run_instance<P>(
| core::Event::Mouse(_)
)
{
_ = control_sender
.start_send(Control::ChangeFlow(ControlFlow::Wait));
continue;
}
runtime.broadcast(subscription::Event::Interaction {