mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
WindowServer+LibGUI: Make menu allocation asynchronous
This was only synchronous since WindowServer managed the ID allocation. Doing this on the client side instead allows us to make create_menu() an asynchronous IPC call, removing a bunch of IPC stalls during application startup.
This commit is contained in:
parent
52054eb922
commit
baab0a5bef
4 changed files with 9 additions and 7 deletions
|
@ -99,12 +99,10 @@ void ClientConnection::destroy_menubar(i32 menubar_id)
|
|||
m_menubars.remove(it);
|
||||
}
|
||||
|
||||
Messages::WindowServer::CreateMenuResponse ClientConnection::create_menu(String const& menu_title)
|
||||
void ClientConnection::create_menu(i32 menu_id, String const& menu_title)
|
||||
{
|
||||
int menu_id = m_next_menu_id++;
|
||||
auto menu = Menu::construct(this, menu_id, menu_title);
|
||||
m_menus.set(menu_id, move(menu));
|
||||
return menu_id;
|
||||
}
|
||||
|
||||
void ClientConnection::destroy_menu(i32 menu_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue