Skip to content
Snippets Groups Projects
Commit 72ce36f7 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Gerd Hoffmann
Browse files

ui/clipboard: reset the serial state on reset


Not only we have to reset the vdagent clipboards serial state, but also
the current QEMU clipboards info serial (the value is currently used by
qemu_clipboard_check_serial, only used by -display dbus).

Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20220912102455.111765-5-marcandre.lureau@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent e46d4d68
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,14 @@ void qemu_clipboard_request(QemuClipboardInfo *info,
void qemu_clipboard_reset_serial(void)
{
QemuClipboardNotify notify = { .type = QEMU_CLIPBOARD_RESET_SERIAL };
int i;
for (i = 0; i < QEMU_CLIPBOARD_SELECTION__COUNT; i++) {
QemuClipboardInfo *info = qemu_clipboard_info(i);
if (info) {
info->serial = 0;
}
}
notifier_list_notify(&clipboard_notifiers, &notify);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment