mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 19:14:58 -06:00
ui/clipboard: add qemu_clipboard_peer_release() helper
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210805135715.857938-8-marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
482bbaf477
commit
1387865eca
2 changed files with 23 additions and 0 deletions
|
@ -24,6 +24,18 @@ bool qemu_clipboard_peer_owns(QemuClipboardPeer *peer,
|
|||
return info && info->owner == peer;
|
||||
}
|
||||
|
||||
void qemu_clipboard_peer_release(QemuClipboardPeer *peer,
|
||||
QemuClipboardSelection selection)
|
||||
{
|
||||
g_autoptr(QemuClipboardInfo) info = NULL;
|
||||
|
||||
if (qemu_clipboard_peer_owns(peer, selection)) {
|
||||
/* set empty clipboard info */
|
||||
info = qemu_clipboard_info_new(NULL, selection);
|
||||
qemu_clipboard_update(info);
|
||||
}
|
||||
}
|
||||
|
||||
void qemu_clipboard_update(QemuClipboardInfo *info)
|
||||
{
|
||||
g_autoptr(QemuClipboardInfo) old = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue