From 0631eece96650afb3715a5c5009005914f90a9b4 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 10 Mar 2021 10:06:29 +0100 Subject: Clipboard.c: add FIXMEs Also improve code to better match the situation described in the FIXME --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index dde5506fa..87473b221 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1670,11 +1670,16 @@ Bool nxagentCollectPropertyEventFromXServer(int resource) * in the selection." * FIXME: this uses serverTransToAgentProperty which is shared between * all the selections. Could be a problem with simultaneous transfers. + * FIXME: NXGetCollectedProperty can return 0 and True. Some other + * functions in this field return False as well. Clean up that + * mess... */ - if (result != 0 && ulReturnBytesLeft == 0) + if (result == True && ulReturnBytesLeft == 0) { #ifdef DEBUG - fprintf (stderr, "%s: Retrieved property data - deleting it for ICCCM conformity.\n", __func__); + fprintf (stderr, "%s: Retrieved property data - deleting property [%ld][%s] " + "for ICCCM conformity.\n", __func__, serverTransToAgentProperty, + NameForRemAtom(serverTransToAgentProperty)); #endif XDeleteProperty(nxagentDisplay, serverWindow, serverTransToAgentProperty); } -- cgit v1.2.3