Commit 65877a19 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Clipboard.c: fix handling of clipboard=none/client/server/both option

parent 80ab8932
...@@ -911,10 +911,11 @@ void nxagentRequestSelection(XEvent *X) ...@@ -911,10 +911,11 @@ void nxagentRequestSelection(XEvent *X)
/* /*
* if one of our clients owns the selection we ask it to copy * if one of our clients owns the selection we ask it to copy
* the selection to the clientCutProperty on nxagent's root * the selection to the clientCutProperty on nxagent's root
* window * window on the real X server.
*/ */
if (IS_INTERNAL_OWNER(i) && 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 * store who on the real X server requested the data and how
...@@ -1563,7 +1564,7 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data, ...@@ -1563,7 +1564,7 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
#endif #endif
if ((pCurSel->pWin != NULL) && if ((pCurSel->pWin != NULL) &&
(nxagentOption(Clipboard) != ClipboardNone) && (nxagentOption(Clipboard) != ClipboardNone) && /* FIXME: shouldn't we also check for != ClipboardClient? */
((pCurSel->selection == XA_PRIMARY) || ((pCurSel->selection == XA_PRIMARY) ||
(pCurSel->selection == MakeAtom("CLIPBOARD", 9, 0)))) (pCurSel->selection == MakeAtom("CLIPBOARD", 9, 0))))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment