mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +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:
@@ -15,6 +15,7 @@
|
||||
#include <LibCore/CObject.h>
|
||||
#include <LibGUI/GAction.h>
|
||||
#include <LibGUI/GApplication.h>
|
||||
#include <LibGUI/GClipboard.h>
|
||||
#include <LibGUI/GDesktop.h>
|
||||
#include <LibGUI/GMenu.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
@@ -244,6 +245,11 @@ void GWindowServerConnection::postprocess_bundles(Vector<IncomingMessageBundle>&
|
||||
continue;
|
||||
}
|
||||
|
||||
if (event.type == WSAPI_ServerMessage::Type::ClipboardContentsChanged) {
|
||||
GClipboard::the().did_receive_clipboard_contents_changed({}, String(event.text, event.text_length));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (event.type == WSAPI_ServerMessage::Error) {
|
||||
dbgprintf("GEventLoop got error message from server\n");
|
||||
dbgprintf(" - error message: %s\n", String(event.text, event.text_length).characters());
|
||||
|
||||
Reference in New Issue
Block a user