summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/ClientConnection.cpp
diff options
context:
space:
mode:
authorMarcus Nilsson <brainbomb@gmail.com>2021-06-06 21:50:06 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-09 22:58:10 +0200
commit2f7dc29ab7974510e5966ec7cff470ed06990253 (patch)
tree2f18abc3ce6fd8bad4d090b8e0e25ef9f334485c /Userland/Services/WindowServer/ClientConnection.cpp
parenta00d154522eeed0b2976827be5dd91500e5a45cf (diff)
downloadserenity-2f7dc29ab7974510e5966ec7cff470ed06990253.zip
LibGUI/WindowServer: Add set_maximized IPC call
Add an IPC call to enable the client to manually maximize it's own window.
Diffstat (limited to 'Userland/Services/WindowServer/ClientConnection.cpp')
-rw-r--r--Userland/Services/WindowServer/ClientConnection.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/ClientConnection.cpp b/Userland/Services/WindowServer/ClientConnection.cpp
index 6fa36dd954..e8ffe7d9ef 100644
--- a/Userland/Services/WindowServer/ClientConnection.cpp
+++ b/Userland/Services/WindowServer/ClientConnection.cpp
@@ -332,6 +332,16 @@ Messages::WindowServer::IsMaximizedResponse ClientConnection::is_maximized(i32 w
return it->value->is_maximized();
}
+void ClientConnection::set_maximized(i32 window_id, bool maximized)
+{
+ auto it = m_windows.find(window_id);
+ if (it == m_windows.end()) {
+ did_misbehave("SetMaximized: Bad window ID");
+ return;
+ }
+ it->value->set_maximized(maximized);
+}
+
void ClientConnection::set_window_icon_bitmap(i32 window_id, Gfx::ShareableBitmap const& icon)
{
auto it = m_windows.find(window_id);