mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:37:36 +00:00
Clipboard+LibGUI: Make set_clipboard_data asynchronous
There's no need for GUI applications to block after the clipping is already in flight.
This commit is contained in:
parent
bfeacb5728
commit
455afd32f2
2 changed files with 2 additions and 2 deletions
|
@ -75,7 +75,7 @@ void Clipboard::set_data(ReadonlyBytes data, const String& type, const HashMap<S
|
||||||
if (!data.is_empty())
|
if (!data.is_empty())
|
||||||
memcpy(buffer.data<void>(), data.data(), data.size());
|
memcpy(buffer.data<void>(), data.data(), data.size());
|
||||||
|
|
||||||
connection().set_clipboard_data(move(buffer), type, metadata);
|
connection().async_set_clipboard_data(move(buffer), type, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClipboardServerConnection::clipboard_data_changed(String const& mime_type)
|
void ClipboardServerConnection::clipboard_data_changed(String const& mime_type)
|
||||||
|
|
|
@ -3,5 +3,5 @@ endpoint ClipboardServer
|
||||||
greet() => ()
|
greet() => ()
|
||||||
|
|
||||||
get_clipboard_data() => (Core::AnonymousBuffer data, [UTF8] String mime_type, IPC::Dictionary metadata)
|
get_clipboard_data() => (Core::AnonymousBuffer data, [UTF8] String mime_type, IPC::Dictionary metadata)
|
||||||
set_clipboard_data(Core::AnonymousBuffer data, [UTF8] String mime_type, IPC::Dictionary metadata) => ()
|
set_clipboard_data(Core::AnonymousBuffer data, [UTF8] String mime_type, IPC::Dictionary metadata) =|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue