diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-13 18:48:22 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-13 18:49:23 +0100 |
commit | cf432b4c3d366edef40798a777ab2014715fd7f4 (patch) | |
tree | eb8e817191dc090a024ecaf1d6bab3b85b6ed470 /WindowServer/WSMessageLoop.cpp | |
parent | fbbf57b61c34e548159f70d496dec2b0fbc54545 (diff) | |
download | serenity-cf432b4c3d366edef40798a777ab2014715fd7f4.zip |
WindowServer: Refactor more of the menu APIs to be message-based.
This is all pretty verbose but I can whittle it down later. :^)
Diffstat (limited to 'WindowServer/WSMessageLoop.cpp')
-rw-r--r-- | WindowServer/WSMessageLoop.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/WindowServer/WSMessageLoop.cpp b/WindowServer/WSMessageLoop.cpp index 2c1659eb6c..a786a963ea 100644 --- a/WindowServer/WSMessageLoop.cpp +++ b/WindowServer/WSMessageLoop.cpp @@ -274,6 +274,19 @@ ssize_t WSMessageLoop::on_receive_from_client(int client_id, const byte* data, s case GUI_ClientMessage::Type::DestroyMenubar: post_message(&WSWindowManager::the(), make<WSAPIDestroyMenubarRequest>(client_id, message.menu.menubar_id)); break; + case GUI_ClientMessage::Type::SetApplicationMenubar: + post_message(&WSWindowManager::the(), make<WSAPISetApplicationMenubarRequest>(client_id, message.menu.menubar_id)); + break; + case GUI_ClientMessage::Type::AddMenuToMenubar: + post_message(&WSWindowManager::the(), make<WSAPIAddMenuToMenubarRequest>(client_id, message.menu.menubar_id, message.menu.menu_id)); + break; + case GUI_ClientMessage::Type::CreateMenu: + ASSERT(message.menu.text_length < sizeof(message.menu.text)); + post_message(&WSWindowManager::the(), make<WSAPICreateMenuRequest>(client_id, String(message.menu.text, message.menu.text_length))); + break; + case GUI_ClientMessage::Type::DestroyMenu: + post_message(&WSWindowManager::the(), make<WSAPIDestroyMenuRequest>(client_id, message.menu.menu_id)); + break; } return size; } |