From c57d719d622dce53c75cd2a30f4541392bd5dc4a Mon Sep 17 00:00:00 2001 From: Tom Date: Tue, 2 Mar 2021 21:10:48 -0700 Subject: WindowServer: Prepare dirty rects if only the frame was invalidated --- Userland/Services/WindowServer/Window.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Userland') diff --git a/Userland/Services/WindowServer/Window.cpp b/Userland/Services/WindowServer/Window.cpp index 0774df0f31..12102bd81f 100644 --- a/Userland/Services/WindowServer/Window.cpp +++ b/Userland/Services/WindowServer/Window.cpp @@ -576,6 +576,14 @@ void Window::prepare_dirty_rects() m_dirty_rects = rect(); } else { m_dirty_rects.move_by(frame().render_rect().location()); + if (m_invalidated_frame) { + if (m_invalidated) { + m_dirty_rects.add(frame().render_rect()); + } else { + for (auto& rects : frame().render_rect().shatter(rect())) + m_dirty_rects.add(rects); + } + } } } -- cgit v1.2.3