mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +00:00
Don't repaint the root layer in invalidated areas with windows over them.
This commit is contained in:
parent
83252397e4
commit
5db720dc59
1 changed files with 10 additions and 1 deletions
|
@ -245,14 +245,23 @@ void WindowManager::processMouseEvent(MouseEvent& event)
|
||||||
void WindowManager::compose()
|
void WindowManager::compose()
|
||||||
{
|
{
|
||||||
printf("[WM] recompose_count: %u\n", ++m_recompose_count);
|
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) {
|
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());
|
dbgprintf("Repaint root %d,%d %dx%d\n", r.x(), r.y(), r.width(), r.height());
|
||||||
PaintEvent event(r);
|
PaintEvent event(r);
|
||||||
m_rootWidget->paintEvent(event);
|
m_rootWidget->paintEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
auto& framebuffer = FrameBuffer::the();
|
||||||
for (auto* window = m_windows_in_order.head(); window; window = window->next()) {
|
for (auto* window = m_windows_in_order.head(); window; window = window->next()) {
|
||||||
if (!window->backing())
|
if (!window->backing())
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue