diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-12 03:13:42 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-12 03:13:42 +0100 |
commit | 5db720dc597f172872b128f74fa70eea544ce3d1 (patch) | |
tree | d930bc46afe9d7406d9c692adb5d0dbbeff88396 /Widgets/WindowManager.cpp | |
parent | 83252397e48561b629bfc9d4c0edd774361b65f3 (diff) | |
download | serenity-5db720dc597f172872b128f74fa70eea544ce3d1.zip |
Don't repaint the root layer in invalidated areas with windows over them.
Diffstat (limited to 'Widgets/WindowManager.cpp')
-rw-r--r-- | Widgets/WindowManager.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Widgets/WindowManager.cpp b/Widgets/WindowManager.cpp index a3eec92928..90e8fa2a0b 100644 --- a/Widgets/WindowManager.cpp +++ b/Widgets/WindowManager.cpp @@ -245,14 +245,23 @@ void WindowManager::processMouseEvent(MouseEvent& event) void WindowManager::compose() { printf("[WM] recompose_count: %u\n", ++m_recompose_count); - auto& framebuffer = FrameBuffer::the(); + auto any_window_contains_rect = [this] (const Rect& r) { + for (auto* window = m_windows_in_order.head(); window; window = window->next()) { + if (outerRectForWindow(window->rect()).contains(r)) + return true; + } + return false; + }; { for (auto& r : m_invalidated_rects) { + if (any_window_contains_rect(r)) + continue; dbgprintf("Repaint root %d,%d %dx%d\n", r.x(), r.y(), r.width(), r.height()); PaintEvent event(r); m_rootWidget->paintEvent(event); } } + auto& framebuffer = FrameBuffer::the(); for (auto* window = m_windows_in_order.head(); window; window = window->next()) { if (!window->backing()) continue; |