mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Don't clear modifier state on focus change (#4157)
I believe that the underlying issue that caused the stuck modifier keys was resolved in the 0.29 winit keyboard refactor. This probably needs to tested on other desktop platforms however since I am only able to test this on windows 11. * Closes <https://github.com/emilk/egui/issues/2332>
This commit is contained in:
@@ -376,9 +376,6 @@ impl State {
|
||||
}
|
||||
WindowEvent::Focused(focused) => {
|
||||
self.egui_input.focused = *focused;
|
||||
// We will not be given a KeyboardInput event when the modifiers are released while
|
||||
// the window does not have focus. Unset all modifier state to be safe.
|
||||
self.egui_input.modifiers = egui::Modifiers::default();
|
||||
self.egui_input
|
||||
.events
|
||||
.push(egui::Event::WindowFocused(*focused));
|
||||
|
||||
Reference in New Issue
Block a user