1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

WindowServer: Walk the open menu stack in reverse on MouseMove events

Fixes lower level menus stealing focus from higher submenus.
This commit is contained in:
thankyouverycool 2022-08-16 07:04:03 -04:00 committed by Andreas Kling
parent e87eb97e68
commit 63b8d04100

View file

@ -197,7 +197,7 @@ void MenuManager::handle_mouse_event(MouseEvent& mouse_event)
}
if (mouse_event.type() == Event::MouseMove) {
for (auto& menu : m_open_menu_stack) {
for (auto& menu : m_open_menu_stack.in_reverse()) {
if (!menu)
continue;
if (!menu->menu_window()->rect().contains(mouse_event.position()))