mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
WindowServer: Don't keep menu items in hovered state after the cursor leaves.
This commit is contained in:
@@ -114,12 +114,19 @@ void WSMenu::on_window_message(WSMessage& message)
|
||||
if (!m_hovered_item)
|
||||
return;
|
||||
did_activate(*m_hovered_item);
|
||||
m_hovered_item = nullptr;
|
||||
redraw();
|
||||
clear_hovered_item();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void WSMenu::clear_hovered_item()
|
||||
{
|
||||
if (!m_hovered_item)
|
||||
return;
|
||||
m_hovered_item = nullptr;
|
||||
redraw();
|
||||
}
|
||||
|
||||
void WSMenu::did_activate(WSMenuItem& item)
|
||||
{
|
||||
if (on_item_activation)
|
||||
|
||||
Reference in New Issue
Block a user