From c7d0abe83765d5b8ed752702b6eccf2bc359620f Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Fri, 8 Oct 2021 18:38:23 +0300 Subject: [PATCH] Add a clarifying log message for INCR clipboard transfers --- unix/xserver/hw/vnc/vncSelection.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/unix/xserver/hw/vnc/vncSelection.c b/unix/xserver/hw/vnc/vncSelection.c index 13b3e32..bdadd70 100644 --- a/unix/xserver/hw/vnc/vncSelection.c +++ b/unix/xserver/hw/vnc/vncSelection.c @@ -43,6 +43,7 @@ static Atom xaPRIMARY, xaCLIPBOARD; static Atom xaTARGETS, xaTIMESTAMP, xaSTRING, xaTEXT, xaUTF8_STRING; +static Atom xaINCR; static Atom *xaBinclips; static unsigned xaHtmlIndex, xaPngIndex; static Bool htmlPngPresent; @@ -96,6 +97,8 @@ void vncSelectionInit(void) xaTEXT = MakeAtom("TEXT", 4, TRUE); xaUTF8_STRING = MakeAtom("UTF8_STRING", 11, TRUE); + xaINCR = MakeAtom("INCR", 4, TRUE); + unsigned i; mimeIndexesFromClient = calloc(dlp_num_mimetypes(), sizeof(unsigned)); numMimesFromClient = 0; @@ -582,6 +585,9 @@ static void vncHandleSelection(Atom selection, Atom target, if (target != property) return; + if (prop->type == xaINCR) + LOG_INFO("Incremental clipboard transfer denied, too large"); + if (target == xaTARGETS) { if (prop->format != 32) return;