diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-10-29 23:17:23 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2021-06-20 20:12:51 +0200 |
commit | a8b375079af4601f3d42ff28bd57a2818a202d99 (patch) | |
tree | a2825db24fc34f91d9a9763aea978b8bfe0c7369 /nx-X11/programs/Xserver/hw | |
parent | a4f2dd3febe01bc31a4076ca46efff03a3b6b5b0 (diff) | |
download | nx-libs-a8b375079af4601f3d42ff28bd57a2818a202d99.tar.gz nx-libs-a8b375079af4601f3d42ff28bd57a2818a202d99.tar.bz2 nx-libs-a8b375079af4601f3d42ff28bd57a2818a202d99.zip |
Clipboard: init variable
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 7 |
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 && |