diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-14 09:19:05 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-14 09:19:05 +0200 |
commit | c543ee5c5bcfbb7dd31ab70f3a64e91933485275 (patch) | |
tree | 9dd18415b69620cf290ace0f647c4c2fa4cbf8f4 /Servers/WindowServer/WSEventLoop.cpp | |
parent | 9d2c4d223a9eb0c9cbe488f7f36e42c8d84b1578 (diff) | |
download | serenity-c543ee5c5bcfbb7dd31ab70f3a64e91933485275.zip |
WindowServer+LibGUI: Store a "data type" with the clipboard content
This will allow us to distinguish between different types of data
stored on the clipboard.
Diffstat (limited to 'Servers/WindowServer/WSEventLoop.cpp')
-rw-r--r-- | Servers/WindowServer/WSEventLoop.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Servers/WindowServer/WSEventLoop.cpp b/Servers/WindowServer/WSEventLoop.cpp index 94e6de2109..df6a2e1a73 100644 --- a/Servers/WindowServer/WSEventLoop.cpp +++ b/Servers/WindowServer/WSEventLoop.cpp @@ -1,3 +1,4 @@ +#include "WSClipboard.h" #include <Kernel/KeyCode.h> #include <Kernel/MousePacket.h> #include <LibCore/CLocalSocket.h> @@ -47,6 +48,12 @@ WSEventLoop::WSEventLoop() m_mouse_notifier = make<CNotifier>(m_mouse_fd, CNotifier::Read); m_mouse_notifier->on_ready_to_read = [this] { drain_mouse(); }; + + WSClipboard::the().on_content_change = [&] { + WSClientConnection::for_each_client([&](auto& client) { + client.notify_about_clipboard_contents_changed(); + }); + }; } WSEventLoop::~WSEventLoop() |