fix: reset control flow if the loop is about to wait with nothing to do.
This commit is contained in:
parent
53fed52405
commit
ad0523230e
1 changed files with 4 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue