Commit c889c27d authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Clipboard.c: fix/improve debugging output

parent dd74cad8
...@@ -276,18 +276,11 @@ void nxagentPrintSelectionStat(int sel) ...@@ -276,18 +276,11 @@ void nxagentPrintSelectionStat(int sel)
fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lOwner.lastTimeChanged); fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lOwner.lastTimeChanged);
/* /*
print the selection name. print the selection name. selection is _always_ a a remote Atom!
*/ */
if (lOwner.client) SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, lOwner.selection);
{ fprintf(stderr, " lastSelectionOwner[].selection [% 4d][%s] (%s)\n", lOwner.selection, validateString(s), lOwner.client ? "inside nxagent" : "remote X server");
fprintf(stderr, " lastSelectionOwner[].selection [% 4d][%s] (local)\n", lOwner.selection, NameForAtom(lOwner.selection)); SAFE_XFree(s);
}
else
{
SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, lOwner.selection);
fprintf(stderr, " lastSelectionOwner[].selection [% 4d][%s] (remote)\n", lOwner.selection, validateString(s));
SAFE_XFree(s);
}
#ifdef CLIENTIDS #ifdef CLIENTIDS
fprintf(stderr, " CurrentSelections[].client [%p] index [%d] PID [%d] Cmd [%s]\n", fprintf(stderr, " CurrentSelections[].client [%p] index [%d] PID [%d] Cmd [%s]\n",
(void *)curSel.client, (void *)curSel.client,
...@@ -358,7 +351,7 @@ void nxagentPrintClipboardStat(char *header) ...@@ -358,7 +351,7 @@ void nxagentPrintClipboardStat(char *header)
fprintf(stderr, "CLIPBOARD\n"); fprintf(stderr, "CLIPBOARD\n");
nxagentPrintSelectionStat(nxagentClipboardSelection); nxagentPrintSelectionStat(nxagentClipboardSelection);
fprintf(stderr, "Atoms (server side)\n"); fprintf(stderr, "Atoms (remote X server)\n");
SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverTARGETS); SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverTARGETS);
fprintf(stderr, " serverTARGETS [% 4d][%s]\n", serverTARGETS, validateString(s)); fprintf(stderr, " serverTARGETS [% 4d][%s]\n", serverTARGETS, validateString(s));
SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverTIMESTAMP); SAFE_XFree(s); s = XGetAtomName(nxagentDisplay, serverTIMESTAMP);
......
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