fix: keyboard events fire twice
This commit is contained in:
parent
0424b4ae42
commit
0df654c14a
1 changed files with 12 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue