From e9a25e7945a119a8843059dcc8e6ff621b6fb03e Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 3 Oct 2020 00:10:27 +0200 Subject: Clipboard.c: catch selection failure from real X server --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 8 ++++++++ 1 file changed, 8 insertions(+) (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 fddb53b97..4197dcebd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1413,6 +1413,14 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X) transferSelection(lastClientClientPtr -> index); } + else if (X->xselection.property == 0) + { + #ifdef DEBUG + fprintf(stderr, "%s: WARNING! Resetting selection transferral for client [%d] because of failure notification from real X server.\n", __func__, + CLINDEX(lastClientClientPtr)); + #endif + endTransfer(SELECTION_FAULT); + } else { #ifdef DEBUG -- cgit v1.2.3