aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2021-06-14 23:01:28 +0200
committerUlrich Sibiller <uli42@gmx.de>2021-06-20 20:12:51 +0200
commitad69d4a0ec5bd1a26942a938d0d902d643b70b4e (patch)
treee58735c2df186fa9f1201a363167948b26622bf2 /nx-X11/programs/Xserver
parent4eba9d6b1c2b6fb6229aebe6406de3b4564e869c (diff)
downloadnx-libs-ad69d4a0ec5bd1a26942a938d0d902d643b70b4e.tar.gz
nx-libs-ad69d4a0ec5bd1a26942a938d0d902d643b70b4e.tar.bz2
nx-libs-ad69d4a0ec5bd1a26942a938d0d902d643b70b4e.zip
Clipboard.c: improve output for PRINT_CLIPBOARD_CONTENT_ON_DEBUG
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index a891af52d..bb1656d7f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -1779,17 +1779,22 @@ Bool nxagentCollectPropertyEventFromXServer(int resource)
ulReturnItems, pszReturnData, 1);
#ifdef DEBUG
- fprintf(stderr, "%s: Selection property [%d][%s] changed to"
+ fprintf(stderr, "%s: Selection property [%d][%s] changed to resultFormat [%d] returnType [%d][%s] len [%d]"
#ifdef PRINT_CLIPBOARD_CONTENT_ON_DEBUG
- "[\"%*.*s\"...]"
+ /* FIXME: only print the string if the resultFormat is 8 */
+ " value [\"%*.*s\"...] hex [0x%2.2x%2.2x%2.2x%2.2x]"
#endif
"\n", __func__,
lastClients[index].property,
- validateString(NameForLocalAtom(lastClients[index].property))
+ validateString(NameForLocalAtom(lastClients[index].property)),
+ resultFormat,
+ atomReturnType, NameForRemoteAtom(atomReturnType),
+ (int)ulReturnItems * resultFormat / 8
#ifdef PRINT_CLIPBOARD_CONTENT_ON_DEBUG
,(int)(min(20, ulReturnItems * resultFormat / 8)),
(int)(min(20, ulReturnItems * resultFormat / 8)),
- pszReturnData
+ pszReturnData,
+ pszReturnData[0], pszReturnData[1], pszReturnData[2], pszReturnData[3]
#endif
);
#endif
@@ -2049,22 +2054,26 @@ void handlePropertyTransferFromAgentToXserver(int index, XlibAtom property)
ulReturnItems);
#ifdef DEBUG
{
- fprintf(stderr, "%s: XChangeProperty sent to window [0x%lx] for property [%ld][%s] len [%d]"
+ fprintf(stderr, "%s: XChangeProperty sent to window [0x%lx] for property [%ld][%s] resultFormat [%d] returnType [%ld][%s] len [%d]"
#ifdef PRINT_CLIPBOARD_CONTENT_ON_DEBUG
- "value [\"%*.*s\"...]"
+ /* FIXME: only print the string if the resultFormat is 8 */
+ " value [\"%*.*s\"...] hex [0x%2.2x%2.2x%2.2x%2.2x]"
#endif
- "\n",
+ "\n",
__func__,
lastServers[index].requestor,
lastServers[index].property,
NameForRemoteAtom(lastServers[index].property),
- (int)ulReturnItems * 8 / 8
+ resultFormat,
+ nxagentLocalToRemoteAtom(atomReturnType), NameForLocalAtom(atomReturnType),
+ (int)ulReturnItems * resultFormat / 8
#ifdef PRINT_CLIPBOARD_CONTENT_ON_DEBUG
,(int)(min(20, ulReturnItems * 8 / 8)),
(int)(min(20, ulReturnItems * 8 / 8)),
- pszReturnData
+ pszReturnData,
+ pszReturnData[0], pszReturnData[1], pszReturnData[2], pszReturnData[3]
#endif
- );
+ );
}
#endif
}