Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Winit 0.30.6 triggers two key press events instead of one #4048

Closed
PPakalns opened this issue Dec 21, 2024 · 8 comments · Fixed by #4049
Closed

Winit 0.30.6 triggers two key press events instead of one #4048

PPakalns opened this issue Dec 21, 2024 · 8 comments · Fixed by #4049
Labels
B - bug Dang, that shouldn't have happened DS - x11

Comments

@PPakalns
Copy link

PPakalns commented Dec 21, 2024

Description

Problem found while using popular egui library with winit 0.30.6. winit 0.30.5 works correctly.

Text edit field registers two key press events instead of one.

If you believe that it is fault of egui integration and the new behavior is correct, feel free to close this issue. Wanted to report it just in case!

OS and window mananger

Ubuntu 24.04.1 LTS
i3 4.24

Winit version

0.30.6

@PPakalns PPakalns added B - bug Dang, that shouldn't have happened DS - x11 labels Dec 21, 2024
@SUPERCILEX
Copy link

Can confirm this is a winit bug, traced back to 107bf91.

@SUPERCILEX
Copy link

Though looking at the commit, maybe this means egui needs to handle things differently?

@PPakalns
Copy link
Author

PPakalns commented Dec 21, 2024

This broke bevy_egui integration too. It retrieves events from bevy, which exposes partially processed events and some winit event data.

https://github.com/vladbat00/bevy_egui/blob/main/src/systems.rs

kchibisov added a commit to kchibisov/winit that referenced this issue Dec 22, 2024
The filtered events were still processed even though they shouldn't once
we know that they're filtered.

Fixes rust-windowing#4048.
@kchibisov
Copy link
Member

#4049

@John-Nagle
Copy link

See: emilk/egui#5509

Works in winit 0.30.5, fails in 0.30.6. Repro available.

kchibisov added a commit that referenced this issue Dec 22, 2024
The filtered events were still processed even though they shouldn't once
we know that they're filtered.

Fixes #4048.
kchibisov added a commit to kchibisov/winit that referenced this issue Dec 22, 2024
The filtered events were still processed even though they shouldn't once
we know that they're filtered.

Fixes rust-windowing#4048.
@John-Nagle
Copy link

John-Nagle commented Dec 22, 2024

Nice. When will this reach crates.io? Thanks.

Edit: just discovered that the unreleased version on trunk has breaking changes, so the version from Github is not a direct replacement. So there is no quick fix for this.

kchibisov added a commit that referenced this issue Dec 22, 2024
The filtered events were still processed even though they shouldn't once
we know that they're filtered.

Fixes #4048.
@PPakalns
Copy link
Author

winit 0.30.7 resolves the issue!

Thank you all!

@John-Nagle
Copy link

Indeed it does. My 3D world viewer is running nicely now. Thanks, and have a good holiday!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - x11
Development

Successfully merging a pull request may close this issue.

4 participants