mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
WindowServer: Un-nest MenuManager::handle_mouse_event() a bit
This commit is contained in:
parent
77a601d52e
commit
3e3d196f06
1 changed files with 43 additions and 44 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue