diff options
Diffstat (limited to 'alacritty')
-rw-r--r-- | alacritty/Cargo.toml | 2 | ||||
-rw-r--r-- | alacritty/src/event.rs | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/alacritty/Cargo.toml b/alacritty/Cargo.toml index c917c59b..b68d10e0 100644 --- a/alacritty/Cargo.toml +++ b/alacritty/Cargo.toml @@ -18,7 +18,7 @@ fnv = "1" serde = { version = "1", features = ["derive"] } serde_yaml = "0.8" serde_json = "1" -glutin = { version = "0.23.0", features = ["serde"] } +glutin = { version = "0.24.0", features = ["serde"] } notify = "4" libc = "0.2" unicode-width = "0.1" diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 94a340d7..e635283b 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -11,9 +11,7 @@ use std::sync::Arc; use std::time::Instant; use glutin::dpi::PhysicalSize; -use glutin::event::{ - DeviceEvent, ElementState, Event as GlutinEvent, ModifiersState, MouseButton, WindowEvent, -}; +use glutin::event::{ElementState, Event as GlutinEvent, ModifiersState, MouseButton, WindowEvent}; use glutin::event_loop::{ControlFlow, EventLoop, EventLoopProxy, EventLoopWindowTarget}; use glutin::platform::desktop::EventLoopExtDesktop; use log::{debug, info, warn}; @@ -553,6 +551,9 @@ impl<N: Notify + OnResize> Processor<N> { processor.mouse_input(state, button); processor.ctx.terminal.dirty = true; }, + WindowEvent::ModifiersChanged(modifiers) => { + processor.modifiers_input(modifiers) + }, WindowEvent::CursorMoved { position, .. } => { let (x, y) = position.into(); let x = limit(x, 0, processor.ctx.size_info.width as i32); @@ -603,13 +604,9 @@ impl<N: Notify + OnResize> Processor<N> { | WindowEvent::Moved(_) => (), } }, - GlutinEvent::DeviceEvent { event, .. } => { - if let DeviceEvent::ModifiersChanged(modifiers) = event { - processor.modifiers_input(modifiers); - } - }, GlutinEvent::Suspended { .. } | GlutinEvent::NewEvents { .. } + | GlutinEvent::DeviceEvent { .. } | GlutinEvent::MainEventsCleared | GlutinEvent::RedrawEventsCleared | GlutinEvent::Resumed |