diff options
author | Tom <tomut@yahoo.com> | 2021-02-21 20:01:38 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-22 09:09:26 +0100 |
commit | b4c0314f1dae98fa5d206a097e29a30950d2624f (patch) | |
tree | cf57a0a582cb1cd6f350830de218d5a1117f3198 /Userland | |
parent | 35363a972a8510052825581880a3ce387db9f614 (diff) | |
download | serenity-b4c0314f1dae98fa5d206a097e29a30950d2624f.zip |
WindowServer: Don't close context menus when hovering over menu bar
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Services/WindowServer/MenuManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Services/WindowServer/MenuManager.cpp b/Userland/Services/WindowServer/MenuManager.cpp index 1c76cab70c..a28dfd5288 100644 --- a/Userland/Services/WindowServer/MenuManager.cpp +++ b/Userland/Services/WindowServer/MenuManager.cpp @@ -291,7 +291,7 @@ void MenuManager::handle_mouse_event(MouseEvent& mouse_event) void MenuManager::handle_menu_mouse_event(Menu& menu, const MouseEvent& event) { bool is_hover_with_any_menu_open = event.type() == MouseEvent::MouseMove - && has_open_menu() + && has_open_menu() && m_current_menu_bar_menu && (m_open_menu_stack.first()->menubar() || m_open_menu_stack.first() == m_system_menu.ptr()); bool is_mousedown_with_left_button = event.type() == MouseEvent::MouseDown && event.button() == MouseButton::Left; bool should_open_menu = (&menu != m_current_menu || !m_current_menu_bar_menu) && (is_hover_with_any_menu_open || is_mousedown_with_left_button); @@ -305,7 +305,7 @@ void MenuManager::handle_menu_mouse_event(Menu& menu, const MouseEvent& event) return; } - if (!m_bar_open) + if (!m_bar_open && m_current_menu_bar_menu) close_everyone(); } |