mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
WindowServer: Notify window-less clients about theme/font changes
This commit is contained in:
parent
3dc0657e58
commit
636c43db6c
1 changed files with 3 additions and 7 deletions
|
@ -1546,18 +1546,14 @@ Gfx::IntRect WindowManager::dnd_rect() const
|
||||||
void WindowManager::invalidate_after_theme_or_font_change()
|
void WindowManager::invalidate_after_theme_or_font_change()
|
||||||
{
|
{
|
||||||
Compositor::the().set_background_color(palette().desktop_background().to_string());
|
Compositor::the().set_background_color(palette().desktop_background().to_string());
|
||||||
HashTable<ClientConnection*> notified_clients;
|
|
||||||
WindowFrame::reload_config();
|
WindowFrame::reload_config();
|
||||||
for_each_window([&](Window& window) {
|
for_each_window([&](Window& window) {
|
||||||
if (window.client()) {
|
|
||||||
if (!notified_clients.contains(window.client())) {
|
|
||||||
window.client()->async_update_system_theme(Gfx::current_system_theme_buffer());
|
|
||||||
notified_clients.set(window.client());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
window.frame().theme_changed();
|
window.frame().theme_changed();
|
||||||
return IterationDecision::Continue;
|
return IterationDecision::Continue;
|
||||||
});
|
});
|
||||||
|
ClientConnection::for_each_client([&](ClientConnection& client) {
|
||||||
|
client.async_update_system_theme(Gfx::current_system_theme_buffer());
|
||||||
|
});
|
||||||
MenuManager::the().did_change_theme();
|
MenuManager::the().did_change_theme();
|
||||||
AppletManager::the().did_change_theme();
|
AppletManager::the().did_change_theme();
|
||||||
Compositor::the().invalidate_occlusions();
|
Compositor::the().invalidate_occlusions();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue