diff options
author | Tom <tomut@yahoo.com> | 2021-03-02 21:10:48 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-03 08:20:11 +0100 |
commit | c57d719d622dce53c75cd2a30f4541392bd5dc4a (patch) | |
tree | 113a44ad6a3b563aeedd13cd6b4e0e03f276e9e0 /Userland | |
parent | 5e7abea31e447f234e18d933e3421fc204009fcc (diff) | |
download | serenity-c57d719d622dce53c75cd2a30f4541392bd5dc4a.zip |
WindowServer: Prepare dirty rects if only the frame was invalidated
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Services/WindowServer/Window.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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); + } + } } } |