diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-14 10:15:49 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-14 10:15:49 +0100 |
commit | 9ab9734da06fc93ddb125ac8906107512242032f (patch) | |
tree | 1a3652e5a8c5d0b0e6a31332817da737bd04f276 /WindowServer/WSClientConnection.cpp | |
parent | 427df5f312bda5f8655e2a1124c16dbb0dcd01d9 (diff) | |
download | serenity-9ab9734da06fc93ddb125ac8906107512242032f.zip |
WindowServer: Add WSClientConnection::post_message().
This way WSWindow doesn't have to grab at the Process.
Diffstat (limited to 'WindowServer/WSClientConnection.cpp')
-rw-r--r-- | WindowServer/WSClientConnection.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/WindowServer/WSClientConnection.cpp b/WindowServer/WSClientConnection.cpp index 61598c92e4..847e565f27 100644 --- a/WindowServer/WSClientConnection.cpp +++ b/WindowServer/WSClientConnection.cpp @@ -57,6 +57,14 @@ void WSClientConnection::post_error(const String& error_message) WSMessageLoop::the().post_message_to_client(m_client_id, message); } +void WSClientConnection::post_message(GUI_ServerMessage&& message) +{ + if (!m_process) + return; + LOCKER(m_process->gui_events_lock()); + m_process->gui_events().append(move(message)); +} + void WSClientConnection::on_message(WSMessage& message) { if (message.is_client_request()) { |