From 176155c695113cec5a2a13e9fc419061c5b2663a Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 21 Oct 2021 09:09:58 -0400 Subject: 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. --- Userland/Libraries/LibGUI/Window.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Userland/Libraries/LibGUI/Window.h') 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 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 }; -- cgit v1.2.3