summaryrefslogtreecommitdiff
path: root/Applications/Terminal
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-13 13:45:58 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-13 13:45:58 +0200
commitce6463ba76f0d3fbd7f6556f0a6100b86324532f (patch)
treec9b2493b49fb64d418102173bfecb7512d5c7c73 /Applications/Terminal
parent178788f19acb56d3baa0a81b051fc5e269334da5 (diff)
downloadserenity-ce6463ba76f0d3fbd7f6556f0a6100b86324532f.zip
Terminal: Clip to the paint event rect
We should try to avoid painting any more than what we're asked to.
Diffstat (limited to 'Applications/Terminal')
-rw-r--r--Applications/Terminal/TerminalWidget.cpp2
1 files changed, 2 insertions, 0 deletions
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