Skip to content

Commit

Permalink
Request repaint after sending events
Browse files Browse the repository at this point in the history
  • Loading branch information
melody-rs committed Mar 25, 2024
1 parent 4eb8f95 commit edff9a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/term/src/backends/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ pub struct ForwardEventListener(Sender<Event>, egui::Context);

impl alacritty_terminal::event::EventListener for ForwardEventListener {
fn send_event(&self, event: Event) {
if matches!(event, Event::Wakeup) {
let needs_repaint = matches!(event, Event::Wakeup);
let _ = self.0.send(event);

if needs_repaint {
self.1.request_repaint();
}
let _ = self.0.send(event);
}
}

Expand Down

0 comments on commit edff9a2

Please sign in to comment.