From b8219e2cc418dd2709d3da1f944c719244a9ffe8 Mon Sep 17 00:00:00 2001 From: Bastiaan van der Plaat Date: Thu, 7 Dec 2023 15:48:23 +0100 Subject: [PATCH] WindowServer: Send menu_item_activated before visibility_did_change --- Userland/Services/WindowServer/Menu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Services/WindowServer/Menu.cpp b/Userland/Services/WindowServer/Menu.cpp index 7ae15377f95..abd915fa864 100644 --- a/Userland/Services/WindowServer/Menu.cpp +++ b/Userland/Services/WindowServer/Menu.cpp @@ -559,6 +559,9 @@ void Menu::did_activate(MenuItem& item, bool leave_menu_open) if (item.type() == MenuItem::Type::Separator) return; + if (m_client) + m_client->async_menu_item_activated(m_menu_id, item.identifier()); + if (!leave_menu_open) start_activation_animation(item); @@ -567,9 +570,6 @@ void Menu::did_activate(MenuItem& item, bool leave_menu_open) if (!leave_menu_open) MenuManager::the().close_everyone(); - - if (m_client) - m_client->async_menu_item_activated(m_menu_id, item.identifier()); } bool Menu::activate_default()