mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:17:36 +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:
parent
8a57885494
commit
176155c695
8 changed files with 29 additions and 7 deletions
|
@ -142,6 +142,7 @@ void Window::show()
|
|||
m_has_alpha_channel,
|
||||
m_modal,
|
||||
m_minimizable,
|
||||
m_closeable,
|
||||
m_resizable,
|
||||
m_fullscreen,
|
||||
m_frameless,
|
||||
|
|
|
@ -53,6 +53,9 @@ public:
|
|||
bool is_minimizable() const { return m_minimizable; }
|
||||
void set_minimizable(bool minimizable) { m_minimizable = minimizable; }
|
||||
|
||||
bool is_closeable() const { return m_closeable; }
|
||||
void set_closeable(bool closeable) { m_closeable = closeable; }
|
||||
|
||||
void set_double_buffering_enabled(bool);
|
||||
void set_has_alpha_channel(bool);
|
||||
bool has_alpha_channel() const { return m_has_alpha_channel; }
|
||||
|
@ -269,6 +272,7 @@ private:
|
|||
bool m_resizable { true };
|
||||
Optional<Gfx::IntSize> m_resize_aspect_ratio {};
|
||||
bool m_minimizable { true };
|
||||
bool m_closeable { true };
|
||||
bool m_maximized_when_windowless { false };
|
||||
bool m_fullscreen { false };
|
||||
bool m_frameless { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue