diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-11 11:06:41 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-11 11:06:41 +0100 |
commit | e6de6c4f451f5d62b18afe877d92a3e0d21a5ce6 (patch) | |
tree | 5c665d9818b99849e91b5284207c8c0f506b0381 /WindowServer/WSWindowManager.cpp | |
parent | 6dd1a1f26d8ca59090962270e71844087d2c8c91 (diff) | |
download | serenity-e6de6c4f451f5d62b18afe877d92a3e0d21a5ce6.zip |
WindowServer: Don't keep menu items in hovered state after the cursor leaves.
Diffstat (limited to 'WindowServer/WSWindowManager.cpp')
-rw-r--r-- | WindowServer/WSWindowManager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/WindowServer/WSWindowManager.cpp b/WindowServer/WSWindowManager.cpp index 1ea94c30d8..cfba1fdda2 100644 --- a/WindowServer/WSWindowManager.cpp +++ b/WindowServer/WSWindowManager.cpp @@ -485,6 +485,10 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event) return; } + if (m_current_menu && m_current_menu->hovered_item() && !m_current_menu->menu_window()->rect().contains(event.position())) { + m_current_menu->clear_hovered_item(); + } + // FIXME: Figure out an automatic menu dismissal logic that feels right. #if 0 if (m_current_menu && event.type() == WSMouseEvent::MouseUp && event.button() == MouseButton::Left) |