summaryrefslogtreecommitdiff
path: root/Userland/Demos/GLTeapot
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-09 10:11:30 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-09 10:11:30 +0200
commit41dc73adc46e040f6de5353fa9ace22da7199766 (patch)
treef7e63c44ec8b7ee6884c0dec6d6da32e6f94c9b7 /Userland/Demos/GLTeapot
parent6998fa5c54aa91520cfe279b6c480eb87c0831fc (diff)
downloadserenity-41dc73adc46e040f6de5353fa9ace22da7199766.zip
Demos: Fix a bunch of incorrect use of GUI::PaintEvent::rect()
A bunch of programs were using the paint event rect as the rect to draw into. Since the event rect could be any invalidated part of the widget, we need to be passing the full Widget::rect().
Diffstat (limited to 'Userland/Demos/GLTeapot')
-rw-r--r--Userland/Demos/GLTeapot/main.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Demos/GLTeapot/main.cpp b/Userland/Demos/GLTeapot/main.cpp
index 0107db298f..dead9e6d6a 100644
--- a/Userland/Demos/GLTeapot/main.cpp
+++ b/Userland/Demos/GLTeapot/main.cpp
@@ -62,9 +62,7 @@ void GLContextWidget::paint_event(GUI::PaintEvent& event)
{
GUI::Painter painter(*this);
painter.add_clip_rect(event.rect());
-
- /* Blit it! */
- painter.draw_scaled_bitmap(event.rect(), *m_bitmap, m_bitmap->rect());
+ painter.draw_scaled_bitmap(rect(), *m_bitmap, m_bitmap->rect());
}
void GLContextWidget::timer_event(Core::TimerEvent&)