From c98c50de7c4de5f90e978b54b400480689eb2455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 5 Aug 2021 17:57:09 +0400 Subject: [PATCH] ui/vdagent: use qemu_clipboard_peer_release helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Message-Id: <20210805135715.857938-13-marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann --- ui/vdagent.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index 362064213c..99ba34646f 100644 --- a/ui/vdagent.c +++ b/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) { - 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)