From e34f152c928482cbe52e1ce8f73398a49291b70a Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 5 Aug 2019 16:16:30 +0200 Subject: Clipboard.c: clientAccum is only used for debugging, add DEBUG ifdefs --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'nx-X11/programs/Xserver') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index ce4802e36..fd418cf8f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -68,7 +68,9 @@ extern Selection *CurrentSelections; int nxagentLastClipboardClient = -1; static int agentClipboardStatus; +#ifdef DEBUG static int clientAccum; +#endif Atom serverCutProperty; Atom clientCutProperty; @@ -1529,29 +1531,29 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, } } + #ifdef DEBUG if (lastClientClientPtr == client && (GetTimeInMillis() - lastClientReqTime < 5000)) { /* - * The same client made consecutive requests - * of clipboard contents with less than 5 - * seconds time interval between them. + * The same client made consecutive requests of clipboard contents + * with less than 5 seconds time interval between them. */ - #ifdef DEBUG fprintf(stderr, "%s: Consecutives request from client [%p] selection [%u] " "elapsed time [%u] clientAccum [%d]\n", __func__, (void *) client, selection, GetTimeInMillis() - lastClientReqTime, clientAccum); - #endif clientAccum++; } else { + /* reset clientAccum as now another client requested the clipboard content */ if (lastClientClientPtr != client) { clientAccum = 0; } } + #endif if ((target == clientTEXT) || (target == XA_STRING) || -- cgit v1.2.3