mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 17:15:44 +00:00
WindowManager: Simplify menu bar open/close logic
Let the global menu bar be either "open" or "closed". Clicking on one of the menus in the menu bar toggles the state. This ends up simpler and more intuitive than what we had before.
This commit is contained in:
@@ -731,7 +731,7 @@ void WSWindowManager::process_mouse_event(WSMouseEvent& event, WSWindow*& hovere
|
||||
if (topmost_menu->hovered_item())
|
||||
topmost_menu->clear_hovered_item();
|
||||
if (event.type() == WSEvent::MouseDown || event.type() == WSEvent::MouseUp)
|
||||
m_menu_manager.close_everyone();
|
||||
m_menu_manager.close_bar();
|
||||
if (event.type() == WSEvent::MouseMove) {
|
||||
for (auto& menu : m_menu_manager.open_menu_stack()) {
|
||||
if (!menu)
|
||||
|
||||
Reference in New Issue
Block a user