WindowServer: Improve screen invalidation on window state changes

Because window states and various flags can affect the windows'
rendered areas it's safer to use the last computed occlusion rectangles
to invalidate areas on the screen that may have to be re-rendered due
to e.g. a window size change.

Fixes #6723
This commit is contained in:
Tom 2021-07-04 15:47:17 -06:00 committed by Andreas Kling
commit fdf701ed96
Notes: sideshowbarker 2024-07-18 10:25:47 +09:00
6 changed files with 85 additions and 45 deletions

View file

@ -399,7 +399,7 @@ void WindowManager::remove_window(Window& window)
if (active == &window || active_input == &window || (active && window.is_descendant_of(*active)) || (active_input && active_input != active && window.is_descendant_of(*active_input)))
pick_new_active_window(&window);
Compositor::the().invalidate_screen(window.frame().render_rect());
window.invalidate_last_rendered_screen_rects_now();
if (m_switcher.is_visible() && window.type() != WindowType::WindowSwitcher)
m_switcher.refresh();