From 84ae4e58806b04d51d864477b10f0ce02e490df8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 12 Jan 2019 16:41:03 +0100 Subject: [PATCH] WindowManager should only flush pixels inside the screen rect. --- Widgets/WindowManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Widgets/WindowManager.cpp b/Widgets/WindowManager.cpp index a45f3483f2..ceb863e174 100644 --- a/Widgets/WindowManager.cpp +++ b/Widgets/WindowManager.cpp @@ -351,9 +351,10 @@ void WindowManager::invalidate(const Window& window) invalidate(outerRectForWindow(window.rect())); } -void WindowManager::flush(const Rect& rect) +void WindowManager::flush(const Rect& a_rect) { auto& framebuffer = FrameBuffer::the(); + auto rect = Rect::intersection(a_rect, framebuffer.rect()); for (int y = rect.top(); y <= rect.bottom(); ++y) { auto* front_scanline = m_front_bitmap->scanline(y);