1
0
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:
ming08108
2024-03-20 07:06:45 -05:00
committed by GitHub
parent 1b34289608
commit 8d47ab8bb9
2 changed files with 1 additions and 18 deletions

View File

@@ -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));