1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

WindowServer: Allow partial repaints in window frame & menubars

Before this change, invalidating any rect in a WindowFrame would cause
the entire window (including frame & drop shadow) to get invalidated,
leading to copious amounts of overdraw when mousing over menubars,
titlebars, and window buttons.

We now simply allow the partial frame invalidations through to the
window's dirty rects collection and the compositor takes care of it.
This commit is contained in:
Andreas Kling 2021-07-08 00:44:19 +02:00
parent cad62230f6
commit 432ab47053
3 changed files with 4 additions and 4 deletions

View file

@ -596,7 +596,7 @@ void WindowFrame::invalidate(Gfx::IntRect relative_rect)
auto window_rect = m_window.rect();
relative_rect.translate_by(frame_rect.x() - window_rect.x(), frame_rect.y() - window_rect.y());
set_dirty();
m_window.invalidate(relative_rect, true);
m_window.invalidate(relative_rect);
}
void WindowFrame::window_rect_changed(const Gfx::IntRect& old_rect, const Gfx::IntRect& new_rect)