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

WindowServer: Fix some gliches when overlays are moved or removed

Keep track of areas that overlays were rendered to when we recompute
occlusions. This allows us to then easily figure out areas where
overlays were moved from or removed from.
This commit is contained in:
Tom 2023-04-03 21:32:09 -06:00 committed by Linus Groh
parent 426d1b7410
commit 9ff1fa1cf3
4 changed files with 35 additions and 19 deletions

View file

@ -56,11 +56,12 @@ protected:
virtual void rect_changed(Gfx::IntRect const&) {};
private:
void clear_invalidated() { m_invalidated = false; }
void did_recompute_occlusions()
[[nodiscard]] bool apply_render_rect()
{
bool needs_invalidation = m_invalidated;
m_invalidated = false;
m_current_rect = m_rect;
return needs_invalidation;
}
Gfx::IntRect m_rect;