Browse Source

ui/vdagent: use qemu_clipboard_peer_release helper

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210805135715.857938-13-marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Marc-André Lureau 4 years ago
parent
commit
c98c50de7c
1 changed files with 1 additions and 7 deletions
  1. 1 7
      ui/vdagent.c

+ 1 - 7
ui/vdagent.c

@@ -507,13 +507,7 @@ static void vdagent_clipboard_recv_data(VDAgentChardev *vd, uint8_t s, uint32_t
 
 
 static void vdagent_clipboard_recv_release(VDAgentChardev *vd, uint8_t s)
 static void vdagent_clipboard_recv_release(VDAgentChardev *vd, uint8_t s)
 {
 {
-    g_autoptr(QemuClipboardInfo) info = NULL;
-
-    if (vd->cbinfo[s] && vd->cbinfo[s]->owner == &vd->cbpeer) {
-        /* set empty clipboard info */
-        info = qemu_clipboard_info_new(NULL, s);
-        qemu_clipboard_update(info);
-    }
+    qemu_clipboard_peer_release(&vd->cbpeer, s);
 }
 }
 
 
 static void vdagent_chr_recv_clipboard(VDAgentChardev *vd, VDAgentMessage *msg)
 static void vdagent_chr_recv_clipboard(VDAgentChardev *vd, VDAgentMessage *msg)