[X2Go-Commits] [nx-libs] 375/429: Clipboard.c: cancel pending requests in certain situations

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:37:11 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 ff4a1967c0f98db79611d1bbf426fd7cebff0abd
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Wed Nov 25 00:30:03 2020 +0100

    Clipboard.c: cancel pending requests in certain situations
---
 nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 6e2337a4d..d46d4c7fc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -714,7 +714,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
 
       setClientSelectionStage(SelectionStageNone, index);
 
-      lastServers[index].requestor = None;
+      replyPendingRequestSelectionToXServer(index, False);
     }
 
     if (pWindow && pWindow == lastClients[index].windowPtr)
@@ -2116,13 +2116,16 @@ static void setSelectionOwnerOnXServer(Selection *pSelection)
     if (lastServers[index].requestor != None)
     {
       /*
-       * we are in the process of communicating back and forth between
-       * real X server and nxagent's clients - let's not disturb
-       * FIXME: by continuing after the warning were ARE disturbing!
-       * We should cancel that communication here.
+       * There's an X client on the real X server waiting for a
+       * reply. That reply will never come because now we are the
+       * owner so let's be fair and cancel that request.
        */
-      fprintf (stderr, "%s: WARNING! lastServers[%d].requestor window [0x%lx] already set.\n",
+      fprintf(stderr, "%s: WARNING! lastServers[%d].requestor window [0x%lx] already set. Cancelling pending request.\n",
                    __func__, index, lastServers[index].requestor);
+
+      replyPendingRequestSelectionToXServer(index, False);
+
+      /* now we can go on */
     }
     #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