diff options
Diffstat (limited to 'src/event_loop.rs')
-rw-r--r-- | src/event_loop.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/event_loop.rs b/src/event_loop.rs index a6eed40e..d1c52367 100644 --- a/src/event_loop.rs +++ b/src/event_loop.rs @@ -211,9 +211,14 @@ impl<Io> EventLoop<Io> state.parser.advance(&mut *terminal, *byte, &mut self.pty); } - terminal.dirty = true; - - self.display.notify(); + // Only request a draw if one hasn't already been requested. + // + // This is a performance optimization even if only for X11 + // which is very expensive to hammer on the even loop wakeup + if !terminal.dirty { + self.display.notify(); + terminal.dirty = true; + } }, Err(err) => { match err.kind() { |