1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:08:11 +00:00

WindowServer: WSWindow can have a pointer to the client rather than an ID.

Since WSWindows are owned by WSConnectionClients, it's fine for them to just
reference the client directly.
This commit is contained in:
Andreas Kling 2019-02-17 08:54:57 +01:00
parent 1056a39bd6
commit 9a39c01551
5 changed files with 19 additions and 22 deletions

View file

@ -295,7 +295,7 @@ void WSClientConnection::handle_request(WSAPIGetWindowRectRequest& request)
void WSClientConnection::handle_request(WSAPICreateWindowRequest& request)
{
int window_id = m_next_window_id++;
auto window = make<WSWindow>(request.client_id(), window_id);
auto window = make<WSWindow>(*this, window_id);
window->set_title(request.title());
window->set_rect(request.rect());
m_windows.set(window_id, move(window));