mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
WindowServer: Add an IPC call to get the window floating rect
This commit is contained in:
parent
deb7ecfbe9
commit
50d0d6e710
3 changed files with 13 additions and 0 deletions
|
@ -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())
|
||||
|
|
|
@ -115,6 +115,7 @@ private:
|
|||
virtual void start_window_resize(i32, i32) override;
|
||||
virtual Messages::WindowServer::SetWindowRectResponse set_window_rect(i32, Gfx::IntRect const&) override;
|
||||
virtual Messages::WindowServer::GetWindowRectResponse get_window_rect(i32) override;
|
||||
virtual Messages::WindowServer::GetWindowFloatingRectResponse get_window_floating_rect(i32) override;
|
||||
virtual void set_window_minimum_size(i32, Gfx::IntSize) override;
|
||||
virtual Messages::WindowServer::GetWindowMinimumSizeResponse get_window_minimum_size(i32) override;
|
||||
virtual Messages::WindowServer::GetAppletRectOnScreenResponse get_applet_rect_on_screen(i32) override;
|
||||
|
|
|
@ -77,6 +77,8 @@ endpoint WindowServer
|
|||
set_window_rect(i32 window_id, Gfx::IntRect rect) => (Gfx::IntRect rect)
|
||||
get_window_rect(i32 window_id) => (Gfx::IntRect rect)
|
||||
|
||||
get_window_floating_rect(i32 window_id) => (Gfx::IntRect rect)
|
||||
|
||||
set_window_minimum_size(i32 window_id, Gfx::IntSize size) =|
|
||||
get_window_minimum_size(i32 window_id) => (Gfx::IntSize size)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue