ui/vdagent: add serial capability support

The Spice agent implements a simple serial mechanism to avoid clipboard
races between client & guest. See:
045a6978d6

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Marc-André Lureau 2021-07-19 00:33:31 +04:00
parent 1b17f1e9f9
commit 835f69f4e6
3 changed files with 43 additions and 1 deletions

View file

@ -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;