summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Window.h
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-10-21 09:09:58 -0400
committerLinus Groh <mail@linusgroh.de>2021-10-21 14:45:30 +0100
commit176155c695113cec5a2a13e9fc419061c5b2663a (patch)
treed60e9800b6734cffcff490c6799502af2fa81f40 /Userland/Libraries/LibGUI/Window.h
parent8a578854949de1bf848d1d2a65e0890832db185d (diff)
downloadserenity-176155c695113cec5a2a13e9fc419061c5b2663a.zip
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.
Diffstat (limited to 'Userland/Libraries/LibGUI/Window.h')
-rw-r--r--Userland/Libraries/LibGUI/Window.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Window.h b/Userland/Libraries/LibGUI/Window.h
index d406aea77b..e472873215 100644
--- a/Userland/Libraries/LibGUI/Window.h
+++ b/Userland/Libraries/LibGUI/Window.h
@@ -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 };