diff --git a/Userland/Services/WindowServer/ClientConnection.h b/Userland/Services/WindowServer/ClientConnection.h index 8e2ecd43db..6ee7fe7456 100644 --- a/Userland/Services/WindowServer/ClientConnection.h +++ b/Userland/Services/WindowServer/ClientConnection.h @@ -84,6 +84,14 @@ public: break; } } + template + void for_each_menu(Callback callback) + { + for (auto& it : m_menus) { + if (callback(*it.value) == IterationDecision::Break) + break; + } + } void notify_display_link(Badge); diff --git a/Userland/Services/WindowServer/MenuManager.cpp b/Userland/Services/WindowServer/MenuManager.cpp index 4731a55317..2bf48cf81f 100644 --- a/Userland/Services/WindowServer/MenuManager.cpp +++ b/Userland/Services/WindowServer/MenuManager.cpp @@ -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)