From ce6463ba76f0d3fbd7f6556f0a6100b86324532f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 13 Aug 2019 13:45:58 +0200 Subject: [PATCH] Terminal: Clip to the paint event rect We should try to avoid painting any more than what we're asked to. --- Applications/Terminal/TerminalWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Applications/Terminal/TerminalWidget.cpp b/Applications/Terminal/TerminalWidget.cpp index 3b444eb820..883b2e7a6a 100644 --- a/Applications/Terminal/TerminalWidget.cpp +++ b/Applications/Terminal/TerminalWidget.cpp @@ -175,6 +175,8 @@ void TerminalWidget::paint_event(GPaintEvent& event) GPainter painter(*this); + painter.add_clip_rect(event.rect()); + if (m_visual_beep_timer.is_active()) painter.fill_rect(frame_inner_rect(), Color::Red); else