[X2Go-Commits] [nx-libs] 358/429: Clipboard: init variable

git-admin at x2go.org git-admin at x2go.org
Mon Oct 18 09:37:07 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 a8b375079af4601f3d42ff28bd57a2818a202d99
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Thu Oct 29 23:17:23 2020 +0100

    Clipboard: init variable
---
 nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 6a7ce5d15..03f9d2554 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -107,7 +107,7 @@ typedef struct _SelectionOwner
 static SelectionOwner *lastSelectionOwner = NULL;
 
 /* FIXME: can this also be stored per selection? */
-static XlibAtom serverLastRequestedSelection;
+static XlibAtom serverLastRequestedSelection = -1;
 
 #define IS_INTERNAL_OWNER(lsoindex) (lastSelectionOwner[lsoindex].client != NULL)
 
@@ -2620,6 +2620,11 @@ int nxagentSendNotificationToSelfViaXServer(xEvent *event)
  */
 WindowPtr nxagentGetClipboardWindow(Atom property)
 {
+  if (serverLastRequestedSelection == -1)
+  {
+    return NULL;
+  }
+
   int index = nxagentFindLastSelectionOwnerIndex(serverLastRequestedSelection);
   if (index < nxagentMaxSelections &&
           property == clientCutProperty &&

--
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