mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:27:44 +00:00
WindowServer+LibGUI: Make menu and menubar teardown asynchronous
Clients don't need to wait for WindowServer to tear down a menu or menubar before continuing.
This commit is contained in:
parent
b1fe5d5517
commit
fb93535419
3 changed files with 4 additions and 4 deletions
|
@ -123,7 +123,7 @@ void Menu::unrealize_menu()
|
||||||
if (m_menu_id == -1)
|
if (m_menu_id == -1)
|
||||||
return;
|
return;
|
||||||
all_menus().remove(m_menu_id);
|
all_menus().remove(m_menu_id);
|
||||||
WindowServerConnection::the().destroy_menu(m_menu_id);
|
WindowServerConnection::the().async_destroy_menu(m_menu_id);
|
||||||
m_menu_id = -1;
|
m_menu_id = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ void Menubar::unrealize_menubar()
|
||||||
{
|
{
|
||||||
if (m_menubar_id == -1)
|
if (m_menubar_id == -1)
|
||||||
return;
|
return;
|
||||||
WindowServerConnection::the().destroy_menubar(m_menubar_id);
|
WindowServerConnection::the().async_destroy_menubar(m_menubar_id);
|
||||||
m_menubar_id = -1;
|
m_menubar_id = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,10 @@ endpoint WindowServer
|
||||||
greet() => (Gfx::IntRect screen_rect, Core::AnonymousBuffer theme_buffer)
|
greet() => (Gfx::IntRect screen_rect, Core::AnonymousBuffer theme_buffer)
|
||||||
|
|
||||||
create_menubar() => (i32 menubar_id)
|
create_menubar() => (i32 menubar_id)
|
||||||
destroy_menubar(i32 menubar_id) => ()
|
destroy_menubar(i32 menubar_id) =|
|
||||||
|
|
||||||
create_menu([UTF8] String menu_title) => (i32 menu_id)
|
create_menu([UTF8] String menu_title) => (i32 menu_id)
|
||||||
destroy_menu(i32 menu_id) => ()
|
destroy_menu(i32 menu_id) =|
|
||||||
|
|
||||||
add_menu_to_menubar(i32 menubar_id, i32 menu_id) =|
|
add_menu_to_menubar(i32 menubar_id, i32 menu_id) =|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue