mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
WindowManager: Move more of the menu management logic to WSMenuManager
This patch moves a whole lot of the menu logic from WSWindowManager to its proper home in WSMenuManager. We also get rid of the "close_current_menu()" concept which was easily confused in the presence of submenus. All operations should now be aware of the menu stack instead. (The concept of a single, current menu made a lot more sense when there were no nested menus.)
This commit is contained in:
@@ -388,7 +388,7 @@ void WSClientConnection::handle_request(const WSAPIDestroyMenuRequest& request)
|
||||
return;
|
||||
}
|
||||
auto& menu = *(*it).value;
|
||||
WSWindowManager::the().close_menu(menu);
|
||||
menu.close();
|
||||
m_menus.remove(it);
|
||||
remove_child(menu);
|
||||
WSAPI_ServerMessage response;
|
||||
|
||||
Reference in New Issue
Block a user