diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-09-12 14:24:52 +0400 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2022-09-23 14:38:27 +0200 |
commit | 0e23ae9c657d65049e5ef3a06451b22830964f35 (patch) | |
tree | 4eb55964c00337580306cf02077cfe2c785241c9 /ui/clipboard.c | |
parent | 410840cdb1342751f58a3521f48d5a9faf694c3b (diff) | |
download | qemu-0e23ae9c657d65049e5ef3a06451b22830964f35.zip qemu-0e23ae9c657d65049e5ef3a06451b22830964f35.tar.gz qemu-0e23ae9c657d65049e5ef3a06451b22830964f35.tar.bz2 |
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/clipboard.c')
-rw-r--r-- | ui/clipboard.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/clipboard.c b/ui/clipboard.c index cd5382f..3e2d02d 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); |