From 1ca0aee93d5ab4f4e95f78a1935c7763931f0182 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 25 Jul 2018 22:27:47 +0200 Subject: Event.c: improve DEBUG output --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'nx-X11/programs') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 4c85145a9..5281b4b5c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2891,9 +2891,21 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X) XFixesSelectionEvent *xfixesEvent = (XFixesSelectionEvent *) X; - if (nxagentXFixesInfo.Initialized == 0 || - xfixesEvent -> type != (nxagentXFixesInfo.EventBase + XFixesSelectionNotify)) - return 0; + if (nxagentXFixesInfo.Initialized == 0) + { + #ifdef DEBUG + fprintf(stderr, "nxagentHandleXFixesSelectionNotify: XFixes not initialized - doing nothing.\n"); + #endif + return 0; + } + + if (xfixesEvent -> type != (nxagentXFixesInfo.EventBase + XFixesSelectionNotify)) + { + #ifdef DEBUG + fprintf(stderr, "nxagentHandleXFixesSelectionNotify: event type is [%d] - doing nothing.\n", xfixesEvent->type); + #endif + return 0; + } #ifdef TEST fprintf(stderr, "nxagentHandleXFixesSelectionNotify: Handling event.\n"); -- cgit v1.2.3