mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
Don't repaint the root layer in invalidated areas with windows over them.
This commit is contained in:
parent
83252397e4
commit
5db720dc59
Notes:
sideshowbarker
2024-07-19 16:04:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/5db720dc597
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue