aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c7
1 files changed, 6 insertions, 1 deletions
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 &&