mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:17:35 +00:00
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.
This commit is contained in:
parent
9d2c4d223a
commit
c543ee5c5b
10 changed files with 94 additions and 15 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue