Message ID | 20220912102455.111765-4-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
Series | ui: various clipboard serial fixes | expand |
diff --git a/ui/vdagent.c b/ui/vdagent.c index f3bd56e3e7..167f5addc1 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -718,8 +718,10 @@ static void vdagent_chr_recv_caps(VDAgentChardev *vd, VDAgentMessage *msg) if (have_mouse(vd) && vd->mouse_hs) { qemu_input_handler_activate(vd->mouse_hs); } + + memset(vd->last_serial, 0, sizeof(vd->last_serial)); + if (have_clipboard(vd) && vd->cbpeer.notifier.notify == NULL) { - memset(vd->last_serial, 0, sizeof(vd->last_serial)); vd->cbpeer.name = "vdagent"; vd->cbpeer.notifier.notify = vdagent_clipboard_notify; vd->cbpeer.request = vdagent_clipboard_request;