aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-05 16:16:30 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:44:07 +0200
commite34f152c928482cbe52e1ce8f73398a49291b70a (patch)
treeecc8276162413801f0aff01b94cda7f466304f87
parent98a0810ffa77646bf4e206bdfabde1295d4ba861 (diff)
downloadnx-libs-e34f152c928482cbe52e1ce8f73398a49291b70a.tar.gz
nx-libs-e34f152c928482cbe52e1ce8f73398a49291b70a.tar.bz2
nx-libs-e34f152c928482cbe52e1ce8f73398a49291b70a.zip
Clipboard.c: clientAccum is only used for debugging, add DEBUG ifdefs
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c12
1 files changed, 7 insertions, 5 deletions
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) ||