aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-12-16 18:32:39 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-05 23:36:02 +0100
commit65877a19995504bc9c2a8cdb17c0ae9f6770534a (patch)
treeec0d8a9f9f2d7006f87a3072172a69f7cf8cf6db
parent80ab8932d65486ab47f722c2282ad2acc9d1f11b (diff)
downloadnx-libs-65877a19995504bc9c2a8cdb17c0ae9f6770534a.tar.gz
nx-libs-65877a19995504bc9c2a8cdb17c0ae9f6770534a.tar.bz2
nx-libs-65877a19995504bc9c2a8cdb17c0ae9f6770534a.zip
Clipboard.c: fix handling of clipboard=none/client/server/both option
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 715895cf0..8d55c74d7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -911,10 +911,11 @@ void nxagentRequestSelection(XEvent *X)
/*
* if one of our clients owns the selection we ask it to copy
* the selection to the clientCutProperty on nxagent's root
- * window
+ * window on the real X server.
*/
if (IS_INTERNAL_OWNER(i) &&
- nxagentOption(Clipboard) != ClipboardClient)
+ (nxagentOption(Clipboard) == ClipboardServer ||
+ nxagentOption(Clipboard) == ClipboardBoth))
{
/*
* store who on the real X server requested the data and how
@@ -1563,7 +1564,7 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
#endif
if ((pCurSel->pWin != NULL) &&
- (nxagentOption(Clipboard) != ClipboardNone) &&
+ (nxagentOption(Clipboard) != ClipboardNone) && /* FIXME: shouldn't we also check for != ClipboardClient? */
((pCurSel->selection == XA_PRIMARY) ||
(pCurSel->selection == MakeAtom("CLIPBOARD", 9, 0))))
{