LibGUI/WindowServer: Add set_maximized IPC call

Add an IPC call to enable the client to manually maximize it's own
window.
This commit is contained in:
Marcus Nilsson 2021-06-06 21:50:06 +02:00 committed by Andreas Kling
commit 2f7dc29ab7
Notes: sideshowbarker 2024-07-18 12:30:44 +09:00
5 changed files with 18 additions and 0 deletions

View file

@ -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);