mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:38:11 +00:00
WindowServer: Don't keep menu items in hovered state after the cursor leaves.
This commit is contained in:
parent
6dd1a1f26d
commit
e6de6c4f45
3 changed files with 16 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue