From 835f69f4e64e2285253bae57f618a75a2756f27c Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 19 Jul 2021 00:33:31 +0400 Subject: ui/vdagent: add serial capability support The Spice agent implements a simple serial mechanism to avoid clipboard races between client & guest. See: https://gitlab.freedesktop.org/spice/spice-protocol/-/commit/045a6978d6dbbf7046affc5c321fa8177c8cce56 Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- include/ui/clipboard.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index d82cf31481..e590b453c8 100644 --- a/include/ui/clipboard.h +++ b/include/ui/clipboard.h @@ -102,6 +102,8 @@ struct QemuClipboardNotify { * @owner: clipboard owner. * @selection: clipboard selection. * @types: clipboard data array (one entry per type). + * @has_serial: whether @serial is available. + * @serial: the grab serial counter. * * Clipboard content data and metadata. */ @@ -109,6 +111,8 @@ struct QemuClipboardInfo { uint32_t refcount; QemuClipboardPeer *owner; QemuClipboardSelection selection; + bool has_serial; + uint32_t serial; struct { bool available; bool requested; -- cgit v1.2.3-55-g7522