Commit 6c751087 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Clipboard.c: improve some more debugging messages

parent 3881d147
...@@ -1234,7 +1234,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -1234,7 +1234,7 @@ void nxagentCollectPropertyEvent(int resource)
if (ulReturnBytesLeft == 0) if (ulReturnBytesLeft == 0)
{ {
#ifdef DEBUG #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 #endif
endTransfer(SELECTION_FAULT); endTransfer(SELECTION_FAULT);
...@@ -1242,7 +1242,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -1242,7 +1242,7 @@ void nxagentCollectPropertyEvent(int resource)
else else
{ {
#ifdef DEBUG #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 #endif
/* /*
...@@ -1265,7 +1265,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -1265,7 +1265,7 @@ void nxagentCollectPropertyEvent(int resource)
if (ulReturnBytesLeft != 0) if (ulReturnBytesLeft != 0)
{ {
#ifdef DEBUG #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 #endif
endTransfer(SELECTION_FAULT); endTransfer(SELECTION_FAULT);
...@@ -1273,7 +1273,7 @@ void nxagentCollectPropertyEvent(int resource) ...@@ -1273,7 +1273,7 @@ void nxagentCollectPropertyEvent(int resource)
else else
{ {
#ifdef DEBUG #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 #endif
ChangeWindowProperty(lastClientWindowPtr, ChangeWindowProperty(lastClientWindowPtr,
...@@ -1930,31 +1930,32 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, ...@@ -1930,31 +1930,32 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
* we only convert to either UTF8 or XA_STRING, despite accepting * we only convert to either UTF8 or XA_STRING, despite accepting
* TEXT and COMPOUND_TEXT. * TEXT and COMPOUND_TEXT.
*/ */
XlibAtom p = serverTransToAgentProperty;
XlibAtom t;
char * pstr = "NX_CUT_BUFFER_SERVER";
const char * tstr;
if (target == clientUTF8_STRING) if (target == clientUTF8_STRING)
{ {
#ifdef DEBUG t = serverUTF8_STRING;
fprintf(stderr, "%s: Sending XConvertSelection with target [%ld][%s], property [%ld][%s]\n", __func__, tstr = szAgentUTF8_STRING;
serverUTF8_STRING, szAgentUTF8_STRING, serverTransToAgentProperty, "NX_CUT_BUFFER_SERVER");
#endif
XConvertSelection(nxagentDisplay, selection, serverUTF8_STRING, serverTransToAgentProperty,
serverWindow, CurrentTime);
} }
else else
{ {
#ifdef DEBUG t = XA_STRING;
fprintf(stderr, "%s: Sending XConvertSelection with target [%d][%s], property [%ld][%s]\n", __func__, tstr = validateString(NameForAtom(XA_STRING));
XA_STRING, validateString(NameForAtom(XA_STRING)), serverTransToAgentProperty, "NX_CUT_BUFFER_SERVER");
#endif
XConvertSelection(nxagentDisplay, selection, XA_STRING, serverTransToAgentProperty,
serverWindow, CurrentTime);
} }
#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 */ /* FIXME: check returncode of XConvertSelection */
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "%s: Sent XConvertSelection with target [%s], property [%s]\n", __func__, fprintf(stderr, "%s: Sent XConvertSelection with target [%s], property [%s]\n", __func__, tstr, pstr);
validateString(NameForAtom(target)), validateString(NameForAtom(property)));
#endif #endif
return 1; return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment