mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
WindowServer: Make way for the out-of-process system menu
This patch removes the internal system menu from WindowServer and replaces it with two IPC API's: SetSystemMenu(menu_id) SetSystemTheme(theme_path, theme_name) These API's will allow us to complete the SystemMenu program and move it entirely out of process.
This commit is contained in:
parent
189fa68c0b
commit
84520d8b59
8 changed files with 63 additions and 165 deletions
|
@ -683,6 +683,25 @@ OwnPtr<Messages::WindowServer::StartDragResponse> ClientConnection::handle(const
|
|||
return make<Messages::WindowServer::StartDragResponse>(true);
|
||||
}
|
||||
|
||||
OwnPtr<Messages::WindowServer::SetSystemMenuResponse> ClientConnection::handle(const Messages::WindowServer::SetSystemMenu& message)
|
||||
{
|
||||
auto it = m_menus.find(message.menu_id());
|
||||
if (it == m_menus.end()) {
|
||||
did_misbehave("SetSystemMenu called with invalid menu ID");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto& menu = it->value;
|
||||
MenuManager::the().set_system_menu(menu);
|
||||
return make<Messages::WindowServer::SetSystemMenuResponse>();
|
||||
}
|
||||
|
||||
OwnPtr<Messages::WindowServer::SetSystemThemeResponse> ClientConnection::handle(const Messages::WindowServer::SetSystemTheme& message)
|
||||
{
|
||||
bool success = WindowManager::the().update_theme(message.theme_path(), message.theme_name());
|
||||
return make<Messages::WindowServer::SetSystemThemeResponse>(success);
|
||||
}
|
||||
|
||||
void ClientConnection::boost()
|
||||
{
|
||||
if (set_process_boost(client_pid(), 10) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue