From 77127fbb41748eae264b1a7578a3bd7d0f94d5c5 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Fri, 25 Oct 2019 00:26:33 +0200 Subject: Fix bell not redrawing without event updates Fixes #2914. --- alacritty/src/event.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index 984352d4..225dc2b5 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -426,8 +426,12 @@ impl Processor { } if terminal.dirty { - // Clear dirty flag - terminal.dirty = !terminal.visual_bell.completed(); + terminal.dirty = false; + + // Request immediate re-draw if visual bell animation is not finished yet + if !terminal.visual_bell.completed() { + event_queue.push(GlutinEvent::UserEvent(Event::Wakeup)); + } // Redraw screen self.display.draw(terminal, &self.message_buffer, &self.config); @@ -440,7 +444,7 @@ impl Processor { /// Handle events from glutin /// - /// Doesn't take self mutably due to borrow checking. Kinda uggo but w/e. + /// Doesn't take self mutably due to borrow checking. fn handle_event( event: GlutinEvent, processor: &mut input::Processor>, -- cgit v1.2.3-54-g00ecf