1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 04:08:11 +00:00

LibGUI+WindowServer: Add a way to dismiss opened menus from the client.

This commit is contained in:
Andreas Kling 2019-04-14 01:53:19 +02:00
parent 29d0412a06
commit 91e1f3ffb1
7 changed files with 44 additions and 0 deletions

View file

@ -50,6 +50,16 @@ void GMenu::popup(const Point& screen_position)
GEventLoop::post_message_to_server(request);
}
void GMenu::dismiss()
{
if (!m_menu_id)
return;
WSAPI_ClientMessage request;
request.type = WSAPI_ClientMessage::Type::DismissMenu;
request.menu.menu_id = m_menu_id;
GEventLoop::post_message_to_server(request);
}
int GMenu::realize_menu()
{
WSAPI_ClientMessage request;