mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
WindowServer: Detach WSMenuManager from WSWindowManager
You can now get to the WSMenuManager via WSMenuManager::the(). Also note that it's initialized after WSWindowManager.
This commit is contained in:
parent
2d75396c94
commit
8ddd053c2a
8 changed files with 41 additions and 39 deletions
|
@ -49,7 +49,7 @@ WSClientConnection::WSClientConnection(CLocalSocket& client_socket, int client_i
|
|||
|
||||
WSClientConnection::~WSClientConnection()
|
||||
{
|
||||
WSWindowManager::the().menu_manager().close_all_menus_from_client({}, *this);
|
||||
WSMenuManager::the().close_all_menus_from_client({}, *this);
|
||||
auto windows = move(m_windows);
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ OwnPtr<WindowServer::DestroyMenubarResponse> WSClientConnection::handle(const Wi
|
|||
return nullptr;
|
||||
}
|
||||
auto& menubar = *(*it).value;
|
||||
WSWindowManager::the().menu_manager().close_menubar(menubar);
|
||||
WSMenuManager::the().close_menubar(menubar);
|
||||
m_menubars.remove(it);
|
||||
return make<WindowServer::DestroyMenubarResponse>();
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ OwnPtr<WindowServer::CreateWindowResponse> WSClientConnection::handle(const Wind
|
|||
window->set_base_size(message.base_size());
|
||||
window->invalidate();
|
||||
if (window->type() == WSWindowType::MenuApplet)
|
||||
WSWindowManager::the().menu_manager().add_applet(*window);
|
||||
WSMenuManager::the().add_applet(*window);
|
||||
m_windows.set(window_id, move(window));
|
||||
return make<WindowServer::CreateWindowResponse>(window_id);
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ OwnPtr<WindowServer::DestroyWindowResponse> WSClientConnection::handle(const Win
|
|||
auto& window = *(*it).value;
|
||||
|
||||
if (window.type() == WSWindowType::MenuApplet)
|
||||
WSWindowManager::the().menu_manager().remove_applet(window);
|
||||
WSMenuManager::the().remove_applet(window);
|
||||
|
||||
WSWindowManager::the().invalidate(window);
|
||||
remove_child(window);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue