fix: keyboard events fire twice

This commit is contained in:
mariinkys 2026-02-28 20:06:20 +01:00 committed by Ashley Wulber
parent 0424b4ae42
commit 0df654c14a

View file

@ -1466,6 +1466,18 @@ async fn run_instance<P>(
}
for (id, event) in events.drain(..) {
if id.is_none()
&& matches!(
event,
core::Event::Keyboard(_)
| core::Event::Touch(_)
| core::Event::Mouse(_)
)
{
_ = control_sender
.start_send(Control::ChangeFlow(ControlFlow::Wait));
continue;
}
runtime.broadcast(subscription::Event::Interaction {
window: id.unwrap_or(window::Id::NONE),
event,