aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-11-25 00:30:03 +0100
committerUlrich Sibiller <uli42@gmx.de>2021-06-20 20:12:51 +0200
commitff4a1967c0f98db79611d1bbf426fd7cebff0abd (patch)
tree7f409d6cf6f27258fcf39f3dd5dc2181130c6a10 /nx-X11
parent8f182cd74b2e1217624ed80de8f62220c09dad2e (diff)
downloadnx-libs-ff4a1967c0f98db79611d1bbf426fd7cebff0abd.tar.gz
nx-libs-ff4a1967c0f98db79611d1bbf426fd7cebff0abd.tar.bz2
nx-libs-ff4a1967c0f98db79611d1bbf426fd7cebff0abd.zip
Clipboard.c: cancel pending requests in certain situations
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 6e2337a4d..d46d4c7fc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -714,7 +714,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
setClientSelectionStage(SelectionStageNone, index);
- lastServers[index].requestor = None;
+ replyPendingRequestSelectionToXServer(index, False);
}
if (pWindow && pWindow == lastClients[index].windowPtr)
@@ -2116,13 +2116,16 @@ static void setSelectionOwnerOnXServer(Selection *pSelection)
if (lastServers[index].requestor != None)
{
/*
- * we are in the process of communicating back and forth between
- * real X server and nxagent's clients - let's not disturb
- * FIXME: by continuing after the warning were ARE disturbing!
- * We should cancel that communication here.
+ * There's an X client on the real X server waiting for a
+ * reply. That reply will never come because now we are the
+ * owner so let's be fair and cancel that request.
*/
- fprintf (stderr, "%s: WARNING! lastServers[%d].requestor window [0x%lx] already set.\n",
+ fprintf(stderr, "%s: WARNING! lastServers[%d].requestor window [0x%lx] already set. Cancelling pending request.\n",
__func__, index, lastServers[index].requestor);
+
+ replyPendingRequestSelectionToXServer(index, False);
+
+ /* now we can go on */
}
#endif