From 65c260edf9a02d71dbc840b867ab64a62fefedc5 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 12 Feb 2021 22:21:39 +0100 Subject: Clipboard.c: improve debugging output once more --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index b77cb181a..508ae5699 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1565,6 +1565,14 @@ Bool nxagentCollectPropertyEventFromXServer(int resource) &ulReturnBytesLeft, &pszReturnData); + #ifdef DEBUG + fprintf(stderr, "%s: NXGetCollectedProperty: result [%d]\n", __func__, result); + fprintf(stderr, "%s: atomReturnType [%ld]\n", __func__, atomReturnType); + fprintf(stderr, "%s: resultFormat [%d]\n", __func__, resultFormat); + fprintf(stderr, "%s: ulReturnItems [%lu]\n", __func__, ulReturnItems); + fprintf(stderr, "%s: ulReturnBytesLeft [%lu]\n", __func__, ulReturnBytesLeft); + #endif + lastClients[index].resource = -1; if (result == 0) @@ -1578,7 +1586,7 @@ Bool nxagentCollectPropertyEventFromXServer(int resource) else if (resultFormat != 8 && resultFormat != 16 && resultFormat != 32) { #ifdef DEBUG - fprintf(stderr, "%s: WARNING! Invalid property format.\n", __func__); + fprintf(stderr, "%s: WARNING! Invalid property format [%d].\n", __func__, resultFormat); #endif endTransfer(index, SELECTION_FAULT); @@ -1638,7 +1646,7 @@ Bool nxagentCollectPropertyEventFromXServer(int resource) else { #ifdef DEBUG - fprintf(stderr, "%s: Got property content from remote server. size [%lu] bytes.\n", __func__, (ulReturnItems * resultFormat / 8)); + fprintf(stderr, "%s: Got property content from remote server. [%lu] items with format [%d] = [%lu] bytes.\n", __func__, ulReturnItems, resultFormat, (ulReturnItems * resultFormat/8)); #endif if (lastClients[index].target == clientTARGETS) @@ -2587,6 +2595,10 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, if (lastClients[index].clientPtr == client) { + #ifdef DEBUG + fprintf(stderr, "%s: same client as previous request\n", __func__); + #endif + if (GetTimeInMillis() - lastClients[index].reqTime < ACCUM_TIME) { /* -- cgit v1.2.3