From 1c31bcb24e4b701be373f6dad567a554535fb492 Mon Sep 17 00:00:00 2001 From: Tom Date: Sat, 20 Feb 2021 23:10:21 -0700 Subject: WindowServer: Allow changing frameless state after a window is created --- Userland/Libraries/LibGUI/Window.cpp | 10 ++++++++++ Userland/Libraries/LibGUI/Window.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'Userland/Libraries/LibGUI') 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(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(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; } -- cgit v1.2.3