1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +00:00

WindowServer: Don't add maximize button to non-resizable windows.

The minimize button can stay though, since it doesn't change the window
size, just the visibility. :^)
This commit is contained in:
Andreas Kling 2019-05-13 00:48:54 +02:00
parent 8c4b7fe385
commit 42cf09fdf1
4 changed files with 10 additions and 16 deletions

View file

@ -474,10 +474,9 @@ void WSClientConnection::handle_request(const WSAPIGetClipboardContentsRequest&)
void WSClientConnection::handle_request(const WSAPICreateWindowRequest& request)
{
int window_id = m_next_window_id++;
auto window = make<WSWindow>(*this, request.window_type(), window_id, request.is_modal());
auto window = make<WSWindow>(*this, request.window_type(), window_id, request.is_modal(), request.is_resizable());
window->set_background_color(request.background_color());
window->set_has_alpha_channel(request.has_alpha_channel());
window->set_resizable(request.is_resizable());
window->set_title(request.title());
window->set_rect(request.rect());
window->set_opacity(request.opacity());