1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

WindowServer: Fix artifacts after window resize in some cases

We were calculating the old window rectangle after changing window
states that may affect these calculations, which sometimes resulted
in artifacts left on the screen, particularily when tiling a window
as this now also constrains rendering to one screen.

Instead, just calculate the new rectangle and use the window's
occlusion information to figure out what areas need to be invalidated.
This commit is contained in:
Tom 2021-06-17 20:16:18 -06:00 committed by Andreas Kling
parent 229b541e5d
commit 0547e0329a
3 changed files with 19 additions and 12 deletions

View file

@ -139,7 +139,7 @@ void Window::set_rect(const Gfx::IntRect& rect)
}
invalidate(true, old_rect.size() != rect.size());
m_frame.notify_window_rect_changed(old_rect, rect); // recomputes occlusions
m_frame.window_rect_changed(old_rect, rect); // recomputes occlusions
}
void Window::set_rect_without_repaint(const Gfx::IntRect& rect)
@ -159,7 +159,7 @@ void Window::set_rect_without_repaint(const Gfx::IntRect& rect)
}
invalidate(true, old_rect.size() != rect.size());
m_frame.notify_window_rect_changed(old_rect, rect); // recomputes occlusions
m_frame.window_rect_changed(old_rect, rect); // recomputes occlusions
}
bool Window::apply_minimum_size(Gfx::IntRect& rect)