aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/event.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-03-11 22:31:59 +0000
committerGitHub <noreply@github.com>2020-03-12 01:31:59 +0300
commitcc2fc0b1c36bbec7eb56d931e435e70a6e6e606c (patch)
treed3a5d42cdc0ffe3de1ad1b5d586167aa187aea92 /alacritty/src/event.rs
parentbb0a214a157adc81d1e598602bba7739ecec8672 (diff)
downloadr-alacritty-cc2fc0b1c36bbec7eb56d931e435e70a6e6e606c.tar.gz
r-alacritty-cc2fc0b1c36bbec7eb56d931e435e70a6e6e606c.tar.bz2
r-alacritty-cc2fc0b1c36bbec7eb56d931e435e70a6e6e606c.zip
Update to glutin 0.24.0
Fixes #3266. Fixes #3248. Fixes #3188. Fixes #3177. Fixes #2445. Fixes #1574.
Diffstat (limited to 'alacritty/src/event.rs')
-rw-r--r--alacritty/src/event.rs13
1 files changed, 5 insertions, 8 deletions
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