From cf85c725889c92ba1aa0d506649362bbfcc111b6 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Tue, 24 Nov 2020 22:23:38 +0100 Subject: Clipboard.c: reset lastServer[].requestor on reconnect --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index af6f16032..eeeb28bab 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -2989,11 +2989,17 @@ Bool nxagentInitClipboard(WindowPtr pWin) /* remSelAtoms have already been adjusted above */ XSetSelectionOwner(nxagentDisplay, remSelAtoms[index], serverWindow, CurrentTime); } + + /* + * On reconnect there cannot be any external requestor + * waiting for a reply so clean this + */ + lastServers[index].requestor = None; + /* - * FIXME: Shouldn't we reset lastServers[index].* and - * lastClients[index].* here? Problem is that (internal) - * clients might still be waiting for answers. Should reply - * with failure then + * FIXME: We should reset lastClients[index].* here! Problem + * is that internal clients might still be waiting for + * answers. Should reply with failure then. */ invalidateTargetCache(index); -- cgit v1.2.3