aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 430a85650..60080ab25 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -598,6 +598,12 @@ static Bool matchSelectionOwner(int index, ClientPtr pClient, WindowPtr pWindow)
(pWindow && lastSelectionOwner[index].windowPtr == pWindow));
}
+/*
+ * Clear relevant clipboard states if a client or window is closing.
+ * Attention: does not work properly when both client AND window
+ * are passed as setClientSelectionStage(None) will also clear
+ * the lastClientWindowPtr!
+ */
void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
{
#ifdef DEBUG