mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 14:02:00 +00:00
LibGUI+WindowServer: Add a way to dismiss opened menus from the client.
This commit is contained in:
parent
29d0412a06
commit
91e1f3ffb1
Notes:
sideshowbarker
2024-07-19 14:43:43 +09:00
Author: https://github.com/awesomekling
Commit: 91e1f3ffb1
7 changed files with 44 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue