From 46bd33402820a3be60e74f0f246081798b32f8e8 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 14 Feb 2020 21:29:32 +0100 Subject: Clipboard.c: improve Clipboard stats resolve lastClientClientPtr to process id and process name --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 990c175a0..492b74295 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -349,7 +349,17 @@ void nxagentDumpClipboardStat(void) fprintf(stderr, " lastClientWindowPtr (WindowPtr) [%p] ([0x%x])\n", (void *)lastClientWindowPtr, WINDOWID(lastClientWindowPtr)); else fprintf(stderr, " lastClientWindowPtr (WindowPtr) -\n"); - fprintf(stderr, " lastClientClientPtr (ClientPtr) [%p]\n", (void *)lastClientClientPtr); +#ifdef CLIENTIDS + fprintf(stderr, " lastClientClientPtr (ClientPtr) [%p] index [%d] PID [%d] Cmd [%s]\n", + (void *)lastClientClientPtr, + CLINDEX(lastClientClientPtr), + GetClientPid(lastClientClientPtr), + GetClientCmdName(lastClientClientPtr)); +#else + fprintf(stderr, " lastClientClientPtr (ClientPtr) [%p] index [%d]\n", + (void *)lastClientClientPtr, + CLINDEX(lastClientClientPtr)) +#endif fprintf(stderr, " lastClientRequestor (Window) [0x%x]\n", lastClientRequestor); fprintf(stderr, " lastClientProperty (Atom) [% 4d][%s]\n", lastClientProperty, NameForAtom(lastClientProperty)); fprintf(stderr, " lastClientSelection (Atom) [% 4d][%s]\n", lastClientSelection, NameForAtom(lastClientSelection)); -- cgit v1.2.3