1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

WindowServer: Recompute occlusions and re-render shadows on theme change

Since theme changes may change geometrics, which are also affected by
window shadows, we need to recompute occlusions as well as re-render
window frames.
This commit is contained in:
Tom 2021-02-09 13:12:59 -07:00 committed by Andreas Kling
parent ace1b34798
commit e1ee59ac9d
2 changed files with 9 additions and 2 deletions

View file

@ -1432,14 +1432,14 @@ bool WindowManager::update_theme(String theme_path, String theme_name)
notified_clients.set(window.client());
}
}
window.frame().layout_buttons();
window.frame().set_button_icons();
window.frame().theme_changed();
return IterationDecision::Continue;
});
MenuManager::the().did_change_theme();
auto wm_config = Core::ConfigFile::open("/etc/WindowServer/WindowServer.ini");
wm_config->write_entry("Theme", "Name", theme_name);
wm_config->sync();
Compositor::the().invalidate_occlusions();
Compositor::the().invalidate_screen();
return true;
}