mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:37:47 +00:00
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:
parent
a00d154522
commit
2f7dc29ab7
5 changed files with 18 additions and 0 deletions
|
@ -915,6 +915,11 @@ bool Window::is_maximized() const
|
|||
return WindowServerConnection::the().is_maximized(m_window_id);
|
||||
}
|
||||
|
||||
void Window::set_maximized(bool maximized)
|
||||
{
|
||||
WindowServerConnection::the().async_set_maximized(m_window_id, maximized);
|
||||
}
|
||||
|
||||
void Window::schedule_relayout()
|
||||
{
|
||||
if (m_layout_pending)
|
||||
|
|
|
@ -40,6 +40,7 @@ public:
|
|||
void set_fullscreen(bool);
|
||||
|
||||
bool is_maximized() const;
|
||||
void set_maximized(bool);
|
||||
|
||||
bool is_frameless() const { return m_frameless; }
|
||||
void set_frameless(bool);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -104,6 +104,7 @@ private:
|
|||
virtual void set_window_title(i32, String const&) override;
|
||||
virtual Messages::WindowServer::GetWindowTitleResponse get_window_title(i32) override;
|
||||
virtual Messages::WindowServer::IsMaximizedResponse is_maximized(i32) override;
|
||||
virtual void set_maximized(i32, bool) override;
|
||||
virtual void start_window_resize(i32) override;
|
||||
virtual Messages::WindowServer::SetWindowRectResponse set_window_rect(i32, Gfx::IntRect const&) override;
|
||||
virtual Messages::WindowServer::GetWindowRectResponse get_window_rect(i32) override;
|
||||
|
|
|
@ -68,6 +68,7 @@ endpoint WindowServer
|
|||
start_window_resize(i32 window_id) =|
|
||||
|
||||
is_maximized(i32 window_id) => (bool maximized)
|
||||
set_maximized(i32 window_id, bool maximized) =|
|
||||
|
||||
invalidate_rect(i32 window_id, Vector<Gfx::IntRect> rects, bool ignore_occlusion) =|
|
||||
did_finish_painting(i32 window_id, Vector<Gfx::IntRect> rects) =|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue