mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
WindowServer: Redraw all menus on system theme change
This commit is contained in:
parent
4b6fba1e4c
commit
b31b904ad0
Notes:
sideshowbarker
2024-07-18 21:04:40 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b31b904ad01
@ -84,6 +84,14 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
template<typename Callback>
|
||||
void for_each_menu(Callback callback)
|
||||
{
|
||||
for (auto& it : m_menus) {
|
||||
if (callback(*it.value) == IterationDecision::Break)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void notify_display_link(Badge<Compositor>);
|
||||
|
||||
|
@ -103,6 +103,13 @@ void MenuManager::refresh()
|
||||
return;
|
||||
draw();
|
||||
window().invalidate();
|
||||
|
||||
ClientConnection::for_each_client([&](ClientConnection& client) {
|
||||
client.for_each_menu([&](Menu& menu) {
|
||||
menu.redraw();
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void MenuManager::event(Core::Event& event)
|
||||
|
Loading…
Reference in New Issue
Block a user