aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Clipboard.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index c200ad64c..018827a0a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -995,6 +995,15 @@ void nxagentHandleSelectionRequestFromXServer(XEvent *X)
return;
}
+ if (!IS_LOCAL_OWNER(index))
+ {
+ #ifdef DEBUG
+ fprintf(stderr, "%s: no local owner for selection [%ld] - denying request.\n", __func__, X->xselectionrequest.selection);
+ #endif
+ replyRequestSelectionToXServer(X, False);
+ return;
+ }
+
#ifdef DEBUG
fprintf(stderr, "%s: lastServers[%d].requestor [0x%lx].\n", __func__, index, lastServers[index].requestor);
#endif