diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2021-06-18 00:06:57 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2021-06-21 22:23:46 +0200 |
commit | 5e017044f69ffb821be678964764a4bfb19afe8b (patch) | |
tree | 40c2146a3bc2491d17a805684b28ab23ab4b79cb /nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | |
parent | 423caaf0ff8826449734a04dc9038b552e6c15e5 (diff) | |
download | nx-libs-5e017044f69ffb821be678964764a4bfb19afe8b.tar.gz nx-libs-5e017044f69ffb821be678964764a4bfb19afe8b.tar.bz2 nx-libs-5e017044f69ffb821be678964764a4bfb19afe8b.zip |
Clipboard.c: do not process requests if we do not have a local owner
This can happen after having processed a SelectionClear event while
the real X server still knows the nxagent serverWindow as the
selection owner.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Clipboard.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 9 |
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 |