From cc2fc0b1c36bbec7eb56d931e435e70a6e6e606c Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Wed, 11 Mar 2020 22:31:59 +0000 Subject: Update to glutin 0.24.0 Fixes #3266. Fixes #3248. Fixes #3188. Fixes #3177. Fixes #2445. Fixes #1574. --- alacritty/src/event.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'alacritty/src') 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 Processor { 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 Processor { | 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 -- cgit