summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/ClientConnection.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-30 22:41:14 +0200
committerAndreas Kling <kling@serenityos.org>2021-03-30 23:43:24 +0200
commit9bbc1c9c930157ba89eb0c3554a67bf4bd6fe7cb (patch)
treeaa489410241d0cc35f653e28bbc2250d6b6a871d /Userland/Services/WindowServer/ClientConnection.cpp
parent44602ae1413dc374e7590dab738944e4e07a653d (diff)
downloadserenity-9bbc1c9c930157ba89eb0c3554a67bf4bd6fe7cb.zip
WindowServer+Taskbar: Show applets in taskbar :^)
WindowServer now collects applet windows into an "applet area" which is really just a window that a WM (window management) client can position via IPC. This is rather hackish, and I think we should come up with a better architecture eventually, but this brings back the missing applets since the global menu where they used to live is gone.
Diffstat (limited to 'Userland/Services/WindowServer/ClientConnection.cpp')
-rw-r--r--Userland/Services/WindowServer/ClientConnection.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Userland/Services/WindowServer/ClientConnection.cpp b/Userland/Services/WindowServer/ClientConnection.cpp
index 8975e76ccc..b16b708d0f 100644
--- a/Userland/Services/WindowServer/ClientConnection.cpp
+++ b/Userland/Services/WindowServer/ClientConnection.cpp
@@ -483,7 +483,7 @@ OwnPtr<Messages::WindowServer::GetWindowRectInMenubarResponse> ClientConnection:
did_misbehave("GetWindowRectInMenubar: Bad window ID");
return {};
}
- return make<Messages::WindowServer::GetWindowRectInMenubarResponse>(it->value->rect_in_menubar());
+ return make<Messages::WindowServer::GetWindowRectInMenubarResponse>(it->value->rect_in_applet_area());
}
Window* ClientConnection::window_from_id(i32 window_id)
@@ -717,6 +717,12 @@ OwnPtr<Messages::WindowServer::SetWindowAlphaHitThresholdResponse> ClientConnect
return make<Messages::WindowServer::SetWindowAlphaHitThresholdResponse>();
}
+OwnPtr<Messages::WindowServer::WM_SetAppletAreaPositionResponse> ClientConnection::handle(const Messages::WindowServer::WM_SetAppletAreaPosition& message)
+{
+ AppletManager::the().set_position(message.position());
+ return make<Messages::WindowServer::WM_SetAppletAreaPositionResponse>();
+}
+
void ClientConnection::handle(const Messages::WindowServer::WM_SetActiveWindow& message)
{
auto* client = ClientConnection::from_client_id(message.client_id());