summaryrefslogtreecommitdiff
path: root/WindowServer/WSWindowManager.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-11 11:06:41 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-11 11:06:41 +0100
commite6de6c4f451f5d62b18afe877d92a3e0d21a5ce6 (patch)
tree5c665d9818b99849e91b5284207c8c0f506b0381 /WindowServer/WSWindowManager.cpp
parent6dd1a1f26d8ca59090962270e71844087d2c8c91 (diff)
downloadserenity-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.cpp4
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)