1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

LibGUI+WindowServer: Add option to hide a widow's close button

This allows windows to be closed only programatically, and not from e.g.
the user clicking the X button on the window frame.
This commit is contained in:
Timothy Flynn 2021-10-21 09:09:58 -04:00 committed by Linus Groh
parent 8a57885494
commit 176155c695
8 changed files with 29 additions and 7 deletions

View file

@ -481,7 +481,7 @@ Window* ClientConnection::window_from_id(i32 window_id)
}
void ClientConnection::create_window(i32 window_id, Gfx::IntRect const& rect,
bool auto_position, bool has_alpha_channel, bool modal, bool minimizable, bool resizable,
bool auto_position, bool has_alpha_channel, bool modal, bool minimizable, bool closeable, bool resizable,
bool fullscreen, bool frameless, bool forced_shadow, bool accessory, float opacity,
float alpha_hit_threshold, Gfx::IntSize const& base_size, Gfx::IntSize const& size_increment,
Gfx::IntSize const& minimum_size, Optional<Gfx::IntSize> const& resize_aspect_ratio, i32 type,
@ -506,7 +506,7 @@ void ClientConnection::create_window(i32 window_id, Gfx::IntRect const& rect,
return;
}
auto window = Window::construct(*this, (WindowType)type, window_id, modal, minimizable, frameless, resizable, fullscreen, accessory, parent_window);
auto window = Window::construct(*this, (WindowType)type, window_id, modal, minimizable, closeable, frameless, resizable, fullscreen, accessory, parent_window);
window->set_forced_shadow(forced_shadow);