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