From c1664b348d97d6ab1a1a6956e1823ca70e64351c Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Tue, 14 Jan 2020 17:01:43 +0100 Subject: [PATCH] Remove synthetic keyboard event handling Fixes #3109. --- CHANGELOG.md | 1 + alacritty/src/event.rs | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 956fcaae..b9f0db4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Crash when starting on some X11 systems - Font size resetting when Alacritty is moved between screens - Limited payload length in clipboard escape (used for Tmux copy/paste) +- Alacritty not ignoring keyboard events for changing WM focus on X11 ## 0.4.1 diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 87f4d627..7f5e385b 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -527,7 +527,7 @@ impl Processor { processor.ctx.display_update_pending.dimensions = Some(size); processor.ctx.terminal.dirty = true; }, - KeyboardInput { input, .. } => { + KeyboardInput { input, is_synthetic: false, .. } => { processor.key_input(input); if input.state == ElementState::Pressed { // Hide cursor while typing @@ -581,7 +581,8 @@ impl Processor { processor.ctx.terminal.dirty = true; } }, - TouchpadPressure { .. } + KeyboardInput { is_synthetic: true, .. } + | TouchpadPressure { .. } | ScaleFactorChanged { .. } | CursorEntered { .. } | AxisMotion { .. } @@ -614,7 +615,8 @@ impl Processor { GlutinEvent::WindowEvent { event, .. } => { use glutin::event::WindowEvent::*; match event { - TouchpadPressure { .. } + KeyboardInput { is_synthetic: true, .. } + | TouchpadPressure { .. } | CursorEntered { .. } | AxisMotion { .. } | HoveredFileCancelled