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

Clear all keys and modifies on focus change #2933

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

emilk
Copy link
Owner

@emilk emilk commented Apr 19, 2023

It is very easy for keys to become stuck when we alt-tab, or a save-dialog opens by Ctrl+S, etc.
Therefore we new clear all the modifiers and down keys to avoid that.

This introduces a new event Event::WindowFocused that integrations should fire.
It also renamed RawInput::has_focus to RawInput::focused. This means the word focused always refers to the entire egui native window, while has_focus is used for individual egui widgets.

It is very easy for keys to become stuck when we alt-tab,
or a save-dialog opens by Ctrl+S, etc.
Therefore we new clear all the modifiers and down keys to avoid that.
@emilk emilk added bug Something is broken eframe Relates to epi and eframe egui-winit porblems related to winit egui labels Apr 19, 2023
@emilk emilk merged commit d1af798 into master Apr 19, 2023
@emilk emilk deleted the emilk/clear-keys-and-modifiers-on-focus-change branch April 19, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken eframe Relates to epi and eframe egui egui-winit porblems related to winit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant