diff options
-rw-r--r-- | Userland/Services/WindowServer/Menu.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Services/WindowServer/Menu.cpp b/Userland/Services/WindowServer/Menu.cpp index a4f107e825..e6c404d8ff 100644 --- a/Userland/Services/WindowServer/Menu.cpp +++ b/Userland/Services/WindowServer/Menu.cpp @@ -338,10 +338,11 @@ void Menu::open_hovered_item(bool leave_menu_open) VERIFY(menu_window()->is_visible()); if (!hovered_item()) return; - if (hovered_item()->is_enabled()) + if (hovered_item()->is_enabled()) { did_activate(*hovered_item(), leave_menu_open); - if (!leave_menu_open) - clear_hovered_item(); + if (!leave_menu_open) + clear_hovered_item(); + } } void Menu::descend_into_submenu_at_hovered_item() |