summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2021-02-20 23:10:21 -0700
committerAndreas Kling <kling@serenityos.org>2021-02-21 10:33:28 +0100
commit1c31bcb24e4b701be373f6dad567a554535fb492 (patch)
treea1ff1cc0f446e91966fd75ac37ba5028021deb0d /Userland/Libraries/LibGUI
parent368fe0f7f80bfcb8a81ff2bde01d017f2ba26aae (diff)
downloadserenity-1c31bcb24e4b701be373f6dad567a554535fb492.zip
WindowServer: Allow changing frameless state after a window is created
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/Window.cpp10
-rw-r--r--Userland/Libraries/LibGUI/Window.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp
index 7ba7de901d..92ebd89e2f 100644
--- a/Userland/Libraries/LibGUI/Window.cpp
+++ b/Userland/Libraries/LibGUI/Window.cpp
@@ -871,6 +871,16 @@ void Window::set_fullscreen(bool fullscreen)
WindowServerConnection::the().send_sync<Messages::WindowServer::SetFullscreen>(m_window_id, fullscreen);
}
+void Window::set_frameless(bool frameless)
+{
+ if (m_frameless == frameless)
+ return;
+ m_frameless = frameless;
+ if (!is_visible())
+ return;
+ WindowServerConnection::the().send_sync<Messages::WindowServer::SetFrameless>(m_window_id, frameless);
+}
+
bool Window::is_maximized() const
{
if (!is_visible())
diff --git a/Userland/Libraries/LibGUI/Window.h b/Userland/Libraries/LibGUI/Window.h
index 50843e5d78..516a07b100 100644
--- a/Userland/Libraries/LibGUI/Window.h
+++ b/Userland/Libraries/LibGUI/Window.h
@@ -58,7 +58,7 @@ public:
bool is_maximized() const;
bool is_frameless() const { return m_frameless; }
- void set_frameless(bool frameless) { m_frameless = frameless; }
+ void set_frameless(bool);
bool is_resizable() const { return m_resizable; }
void set_resizable(bool resizable) { m_resizable = resizable; }