1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 22:37:34 +00:00

WindowServer: Add an IPC call to get the window floating rect

This commit is contained in:
Tim Ledbetter 2023-09-21 21:22:08 +01:00 committed by Andrew Kaster
parent deb7ecfbe9
commit 50d0d6e710
3 changed files with 13 additions and 0 deletions

View file

@ -502,6 +502,16 @@ Messages::WindowServer::GetWindowRectResponse ConnectionFromClient::get_window_r
return it->value->rect();
}
Messages::WindowServer::GetWindowFloatingRectResponse ConnectionFromClient::get_window_floating_rect(i32 window_id)
{
auto it = m_windows.find(window_id);
if (it == m_windows.end()) {
did_misbehave("GetWindowFloatingRect: Bad window ID");
return nullptr;
}
return it->value->floating_rect();
}
static Gfx::IntSize calculate_minimum_size_for_window(Window const& window)
{
if (window.is_frameless())