-
Couldn't load subscription status.
- Fork 1.1k
Implement WindowEvent ModifiersChanged for X11 and Wayland #1132
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
Implement WindowEvent ModifiersChanged for X11 and Wayland #1132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the wayland part, cannot tell for the x11 one.
|
Moving your mouse onto the window, pressing the keys, moving it off, removing the keys made Also, shouldn't we distinguish between Left and Right shift/alt? Seams a shame we don't track them separately. |
|
I've addressed the issue with modifier desync when switching windows in what I believe is the most reasonable way: When a window goes out of focus, a While this may not reflect the "true" modifier state for the user's window manager environment, it simplifies the logic required by winit to keep modifier state correct. A more "accurate" solution would require tracking last known modifier state for each open window -- increasing complexity and the potential for bugs. The most "accurate" solution would even require updating out-of-focus windows for every I think the solution I've implemented will be sufficient for most applications. |
|
Fixed the CI errors by running |
|
When |
|
The keyboard delay was being "caused" by stdout being buffered... What a false positive. (Took a good half hour to figure out...) |
cargo fmthas been run on this branchCHANGELOG.mdif knowledge of this change could be valuable to users