From b43575ebcb094313d04d813564edc033e6329fcc Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Tue, 5 Oct 2021 12:47:58 +0300 Subject: [PATCH] Move binclip clear to probing phase --- unix/xserver/hw/vnc/vncSelection.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/unix/xserver/hw/vnc/vncSelection.c b/unix/xserver/hw/vnc/vncSelection.c index 54e1623..13b3e32 100644 --- a/unix/xserver/hw/vnc/vncSelection.c +++ b/unix/xserver/hw/vnc/vncSelection.c @@ -593,6 +593,7 @@ static void vncHandleSelection(Atom selection, Atom target, vncHasAtom(xaUTF8_STRING, (const Atom*)prop->data, prop->size) || vncHasBinaryClipboardAtom((const Atom*)prop->data, prop->size)) { LOG_DEBUG("Compatible format found, notifying clients"); + vncClearBinaryClipboardData(); activeSelection = selection; vncAnnounceClipboard(TRUE); vncHandleClipboardRequest(); @@ -606,7 +607,6 @@ static void vncHandleSelection(Atom selection, Atom target, unsigned i; Bool skiphtml = FALSE; - Bool cleared = FALSE; if (htmlPngPresent && vncHasAtom(xaBinclips[xaHtmlIndex], (const Atom*)prop->data, prop->size) && vncHasAtom(xaBinclips[xaPngIndex], (const Atom*)prop->data, prop->size)) @@ -616,10 +616,6 @@ static void vncHandleSelection(Atom selection, Atom target, if (skiphtml && i == xaHtmlIndex) continue; if (vncHasAtom(xaBinclips[i], (const Atom*)prop->data, prop->size)) { - if (!cleared) { - vncClearBinaryClipboardData(); - cleared = TRUE; - } vncSelectionRequest(selection, xaBinclips[i]); //break; }