summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau2022-09-12 12:24:52 +0200
committerGerd Hoffmann2022-09-23 14:38:27 +0200
commit0e23ae9c657d65049e5ef3a06451b22830964f35 (patch)
tree4eb55964c00337580306cf02077cfe2c785241c9 /ui
parentui: add some vdagent related traces (diff)
downloadqemu-0e23ae9c657d65049e5ef3a06451b22830964f35.tar.gz
qemu-0e23ae9c657d65049e5ef3a06451b22830964f35.tar.xz
qemu-0e23ae9c657d65049e5ef3a06451b22830964f35.zip
ui/clipboard: fix serial priority
The incoming grab event should have a higher serial. See also "vdagent: introduce VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL": https://gitlab.freedesktop.org/spice/spice-protocol/-/commit/045a6978d6dbbf7046affc5c321fa8177c8cce56 This is only a relevant fix for the -display dbus, only user of that function. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220912102455.111765-3-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/clipboard.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/clipboard.c b/ui/clipboard.c
index cd5382fcb0..3e2d02d549 100644
--- a/ui/clipboard.c
+++ b/ui/clipboard.c
@@ -54,9 +54,9 @@ bool qemu_clipboard_check_serial(QemuClipboardInfo *info, bool client)
}
if (client) {
- ok = cbinfo[info->selection]->serial >= info->serial;
+ ok = info->serial >= cbinfo[info->selection]->serial;
} else {
- ok = cbinfo[info->selection]->serial > info->serial;
+ ok = info->serial > cbinfo[info->selection]->serial;
}
trace_clipboard_check_serial(cbinfo[info->selection]->serial, info->serial, ok);