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

WindowServer: Un-nest MenuManager::handle_mouse_event() a bit

This commit is contained in:
Andreas Kling 2021-04-01 09:10:07 +02:00
parent 77a601d52e
commit 3e3d196f06

View file

@ -171,7 +171,8 @@ void MenuManager::event(Core::Event& event)
void MenuManager::handle_mouse_event(MouseEvent& mouse_event)
{
if (has_open_menu()) {
if (!has_open_menu())
return;
auto* topmost_menu = m_open_menu_stack.last().ptr();
VERIFY(topmost_menu);
auto* window = topmost_menu->menu_window();
@ -226,8 +227,6 @@ void MenuManager::handle_mouse_event(MouseEvent& mouse_event)
break;
}
}
return;
}
}
void MenuManager::close_all_menus_from_client(Badge<ClientConnection>, ClientConnection& client)