diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-02-16 00:09:14 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-31 12:52:35 +0200 |
commit | 6c751087e0aacb88f45d9dde8bf75ee3844d798d (patch) | |
tree | b12d679b94d2b05eb80d2a81f8e51f184c9aeece | |
parent | 3881d1473c09b99d1610286a3179bc9b433548ac (diff) | |
download | nx-libs-6c751087e0aacb88f45d9dde8bf75ee3844d798d.tar.gz nx-libs-6c751087e0aacb88f45d9dde8bf75ee3844d798d.tar.bz2 nx-libs-6c751087e0aacb88f45d9dde8bf75ee3844d798d.zip |
Clipboard.c: improve some more debugging messages
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 78c3fa942..430a85650 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1234,7 +1234,7 @@ void nxagentCollectPropertyEvent(int resource) if (ulReturnBytesLeft == 0) { #ifdef DEBUG - fprintf (stderr, "%s: Aborting selection notify procedure.\n", __func__); + fprintf (stderr, "%s: data size is [0] - aborting selection notify procedure.\n", __func__); #endif endTransfer(SELECTION_FAULT); @@ -1242,7 +1242,7 @@ void nxagentCollectPropertyEvent(int resource) else { #ifdef DEBUG - fprintf(stderr, "%s: Got property size from remote server.\n", __func__); + fprintf(stderr, "%s: Got property size [%lu] from remote server.\n", __func__, ulReturnBytesLeft); #endif /* @@ -1265,7 +1265,7 @@ void nxagentCollectPropertyEvent(int resource) if (ulReturnBytesLeft != 0) { #ifdef DEBUG - fprintf (stderr, "%s: Aborting selection notify procedure.\n", __func__); + fprintf (stderr, "%s: not all content could be retrieved - [%lu] bytes left - aborting selection notify procedure.\n", __func__, ulReturnBytesLeft); #endif endTransfer(SELECTION_FAULT); @@ -1273,7 +1273,7 @@ void nxagentCollectPropertyEvent(int resource) else { #ifdef DEBUG - fprintf(stderr, "%s: Got property content from remote server.\n", __func__); + fprintf(stderr, "%s: Got property content from remote server. size [%lu] bytes.\n", __func__, (ulReturnItems * resultFormat / 8)); #endif ChangeWindowProperty(lastClientWindowPtr, @@ -1930,31 +1930,32 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, * we only convert to either UTF8 or XA_STRING, despite accepting * TEXT and COMPOUND_TEXT. */ + XlibAtom p = serverTransToAgentProperty; + XlibAtom t; + char * pstr = "NX_CUT_BUFFER_SERVER"; + const char * tstr; if (target == clientUTF8_STRING) { - #ifdef DEBUG - fprintf(stderr, "%s: Sending XConvertSelection with target [%ld][%s], property [%ld][%s]\n", __func__, - serverUTF8_STRING, szAgentUTF8_STRING, serverTransToAgentProperty, "NX_CUT_BUFFER_SERVER"); - #endif - XConvertSelection(nxagentDisplay, selection, serverUTF8_STRING, serverTransToAgentProperty, - serverWindow, CurrentTime); + t = serverUTF8_STRING; + tstr = szAgentUTF8_STRING; } else { - #ifdef DEBUG - fprintf(stderr, "%s: Sending XConvertSelection with target [%d][%s], property [%ld][%s]\n", __func__, - XA_STRING, validateString(NameForAtom(XA_STRING)), serverTransToAgentProperty, "NX_CUT_BUFFER_SERVER"); - #endif - - XConvertSelection(nxagentDisplay, selection, XA_STRING, serverTransToAgentProperty, - serverWindow, CurrentTime); + t = XA_STRING; + tstr = validateString(NameForAtom(XA_STRING)); } + #ifdef DEBUG + fprintf(stderr, "%s: Sending XConvertSelection to real X server: requestor [0x%x] target [%ld][%s] property [%ld][%s] time [%ld]\n", __func__, + serverWindow, t, tstr, p, pstr, CurrentTime); + #endif + + XConvertSelection(nxagentDisplay, selection, t, p, serverWindow, CurrentTime); + /* FIXME: check returncode of XConvertSelection */ #ifdef DEBUG - fprintf(stderr, "%s: Sent XConvertSelection with target [%s], property [%s]\n", __func__, - validateString(NameForAtom(target)), validateString(NameForAtom(property))); + fprintf(stderr, "%s: Sent XConvertSelection with target [%s], property [%s]\n", __func__, tstr, pstr); #endif return 1; |