ui/vdagent: notify clipboard peers of serial reset
Since we reset the serial counters, peers should also be reset to be sync. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240717171541.201525-4-marcandre.lureau@redhat.com>
This commit is contained in:
parent
81c88ce0b8
commit
63a5d4de58
@ -155,6 +155,8 @@ void qemu_clipboard_reset_serial(void)
|
||||
QemuClipboardNotify notify = { .type = QEMU_CLIPBOARD_RESET_SERIAL };
|
||||
int i;
|
||||
|
||||
trace_clipboard_reset_serial();
|
||||
|
||||
for (i = 0; i < QEMU_CLIPBOARD_SELECTION__COUNT; i++) {
|
||||
QemuClipboardInfo *info = qemu_clipboard_info(i);
|
||||
if (info) {
|
||||
|
@ -130,6 +130,7 @@ xkeymap_keymap(const char *name) "keymap '%s'"
|
||||
|
||||
# clipboard.c
|
||||
clipboard_check_serial(int cur, int recv, bool ok) "cur:%d recv:%d %d"
|
||||
clipboard_reset_serial(void) ""
|
||||
|
||||
# vdagent.c
|
||||
vdagent_fe_open(bool fe_open) "fe_open=%d"
|
||||
|
@ -720,6 +720,8 @@ static void vdagent_chr_recv_caps(VDAgentChardev *vd, VDAgentMessage *msg)
|
||||
memset(vd->last_serial, 0, sizeof(vd->last_serial));
|
||||
|
||||
if (have_clipboard(vd) && vd->cbpeer.notifier.notify == NULL) {
|
||||
qemu_clipboard_reset_serial();
|
||||
|
||||
vd->cbpeer.name = "vdagent";
|
||||
vd->cbpeer.notifier.notify = vdagent_clipboard_notify;
|
||||
vd->cbpeer.request = vdagent_clipboard_request;
|
||||
|
Loading…
Reference in New Issue
Block a user