[X2Go-Commits] [nx-libs] 404/429: Clipboard.c: improve output for PRINT_CLIPBOARD_CONTENT_ON_DEBUG

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:37:16 CEST 2021


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit ad69d4a0ec5bd1a26942a938d0d902d643b70b4e
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Mon Jun 14 23:01:28 2021 +0200

    Clipboard.c: improve output for PRINT_CLIPBOARD_CONTENT_ON_DEBUG
---
 nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 29 +++++++++++++++++---------
 1 file 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
         }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list