From 48861e463311145a653350688dc4bad83a528d91 Mon Sep 17 00:00:00 2001 From: Maciej Makowski Date: Sat, 16 Nov 2019 21:11:56 +0000 Subject: Fix WinPTY freeze on termination Fixes #2889. --- alacritty/src/event.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'alacritty/src') diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 1fc1ee42..2c171e23 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -30,6 +30,7 @@ use alacritty_terminal::selection::Selection; use alacritty_terminal::sync::FairMutex; use alacritty_terminal::term::cell::Cell; use alacritty_terminal::term::{SizeInfo, Term}; +#[cfg(not(windows))] use alacritty_terminal::tty; use alacritty_terminal::util::{limit, start_daemon}; @@ -351,14 +352,14 @@ impl Processor { info!("glutin event: {:?}", event); } - match (&event, tty::process_should_exit()) { + match &event { // Check for shutdown - (GlutinEvent::UserEvent(Event::Exit), _) | (_, true) => { + GlutinEvent::UserEvent(Event::Exit) => { *control_flow = ControlFlow::Exit; return; }, // Process events - (GlutinEvent::EventsCleared, _) => { + GlutinEvent::EventsCleared => { *control_flow = ControlFlow::Wait; if event_queue.is_empty() { -- cgit