fix: filter out events with no window id, if the window id is needed

This commit is contained in:
Ashley Wulber 2024-10-21 19:07:53 -04:00
parent 1349ef96b7
commit 175a71590a
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820

View file

@ -1347,6 +1347,16 @@ 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(_)
)
{
continue;
}
runtime.broadcast(subscription::Event::Interaction {
window: id.unwrap_or(window::Id::NONE),
event,