mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +00:00
LibGUI+WindowServer: Add a way to dismiss opened menus from the client.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user