summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-01-14 17:01:43 +0100
committerGitHub <noreply@github.com>2020-01-14 17:01:43 +0100
commitc1664b348d97d6ab1a1a6956e1823ca70e64351c (patch)
tree99eb76cbe0abfa7353a0f50a28a50be40c265862
parent12e211d82a1bdef4ffe70c74ee62bc56edfa7590 (diff)
downloadalacritty-c1664b348d97d6ab1a1a6956e1823ca70e64351c.tar.gz
alacritty-c1664b348d97d6ab1a1a6956e1823ca70e64351c.zip
Remove synthetic keyboard event handling
Fixes #3109.
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty/src/event.rs8
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<N: Notify + OnResize> Processor<N> {
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<N: Notify + OnResize> Processor<N> {
processor.ctx.terminal.dirty = true;
}
},
- TouchpadPressure { .. }
+ KeyboardInput { is_synthetic: true, .. }
+ | TouchpadPressure { .. }
| ScaleFactorChanged { .. }
| CursorEntered { .. }
| AxisMotion { .. }
@@ -614,7 +615,8 @@ impl<N: Notify + OnResize> Processor<N> {
GlutinEvent::WindowEvent { event, .. } => {
use glutin::event::WindowEvent::*;
match event {
- TouchpadPressure { .. }
+ KeyboardInput { is_synthetic: true, .. }
+ | TouchpadPressure { .. }
| CursorEntered { .. }
| AxisMotion { .. }
| HoveredFileCancelled