diff options
author | 2024-10-24 16:12:18 -0400 | |
---|---|---|
committer | 2024-10-24 16:12:18 -0400 | |
commit | 6ed88f7608c952ca641812ae71edcf8a92d264b9 (patch) | |
tree | 7de97e59f7508a4a90ae0961bb5ae4fd2599a2af /winit/src | |
parent | 17b35df160d38b4d41917bdc00cdecda4816baa9 (diff) | |
download | iced-6ed88f7608c952ca641812ae71edcf8a92d264b9.tar.gz iced-6ed88f7608c952ca641812ae71edcf8a92d264b9.tar.bz2 iced-6ed88f7608c952ca641812ae71edcf8a92d264b9.zip |
Prevent unintended keyboard input during focus.
Diffstat (limited to 'winit/src')
-rw-r--r-- | winit/src/conversion.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index 5d0f8348..8e6f7aae 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -191,6 +191,8 @@ pub fn window_event( })) } }, + // Ignore keyboard presses/releases during window focus/unfocus + WindowEvent::KeyboardInput { is_synthetic, .. } if is_synthetic => None, WindowEvent::KeyboardInput { event, .. } => Some(Event::Keyboard({ let key = { #[cfg(not(target_arch = "wasm32"))] |