diff options
author | Tom <tomut@yahoo.com> | 2021-02-20 23:10:21 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-21 10:33:28 +0100 |
commit | 1c31bcb24e4b701be373f6dad567a554535fb492 (patch) | |
tree | a1ff1cc0f446e91966fd75ac37ba5028021deb0d /Userland/Services/WindowServer/ClientConnection.cpp | |
parent | 368fe0f7f80bfcb8a81ff2bde01d017f2ba26aae (diff) | |
download | serenity-1c31bcb24e4b701be373f6dad567a554535fb492.zip |
WindowServer: Allow changing frameless state after a window is created
Diffstat (limited to 'Userland/Services/WindowServer/ClientConnection.cpp')
-rw-r--r-- | Userland/Services/WindowServer/ClientConnection.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/ClientConnection.cpp b/Userland/Services/WindowServer/ClientConnection.cpp index b83461678c..2626d9c4fb 100644 --- a/Userland/Services/WindowServer/ClientConnection.cpp +++ b/Userland/Services/WindowServer/ClientConnection.cpp @@ -286,6 +286,18 @@ OwnPtr<Messages::WindowServer::SetFullscreenResponse> ClientConnection::handle(c return make<Messages::WindowServer::SetFullscreenResponse>(); } +OwnPtr<Messages::WindowServer::SetFramelessResponse> ClientConnection::handle(const Messages::WindowServer::SetFrameless& message) +{ + auto it = m_windows.find(message.window_id()); + if (it == m_windows.end()) { + did_misbehave("SetFrameless: Bad window ID"); + return {}; + } + it->value->set_frameless(message.frameless()); + WindowManager::the().tell_wm_listeners_window_state_changed(*it->value); + return make<Messages::WindowServer::SetFramelessResponse>(); +} + OwnPtr<Messages::WindowServer::SetWindowOpacityResponse> ClientConnection::handle(const Messages::WindowServer::SetWindowOpacity& message) { auto it = m_windows.find(message.window_id()); |