mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
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: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220912102455.111765-5-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
e46d4d6842
commit
72ce36f77c
1 changed files with 7 additions and 0 deletions
|
@ -139,7 +139,14 @@ void qemu_clipboard_request(QemuClipboardInfo *info,
|
||||||
void qemu_clipboard_reset_serial(void)
|
void qemu_clipboard_reset_serial(void)
|
||||||
{
|
{
|
||||||
QemuClipboardNotify notify = { .type = QEMU_CLIPBOARD_RESET_SERIAL };
|
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, ¬ify);
|
notifier_list_notify(&clipboard_notifiers, ¬ify);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue