From 65d29df13fc4c955ddf60a200d41d8be7283c505 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 20 Jun 2021 12:58:04 +0200 Subject: Clipboard.c: Only take full clipboard clearing action if non-empty --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 85ef1ae16..09c7eb2c2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -912,21 +912,21 @@ void nxagentHandleSelectionClearFromXServer(XEvent *X) x.u.selectionClear.atom = CurrentSelections[index].selection; sendEventToClient(lastSelectionOwner[index].client, &x); - } - /* - * Set the root window with the NullClient as selection owner. Our - * clients asking for the owner via XGetSelectionOwner() will get - * these for an answer. - */ - CurrentSelections[index].window = screenInfo.screens[0]->root->drawable.id; - CurrentSelections[index].client = NullClient; + /* + * Set the root window with the NullClient as selection owner. Our + * clients asking for the owner via XGetSelectionOwner() will get + * this for an answer. + */ + CurrentSelections[index].window = screenInfo.screens[0]->root->drawable.id; + CurrentSelections[index].client = NullClient; - clearSelectionOwnerData(index); + clearSelectionOwnerData(index); - setClientSelectionStage(index, SelectionStageNone); + setClientSelectionStage(index, SelectionStageNone); - invalidateTargetCache(index); + invalidateTargetCache(index); + } } } -- cgit v1.2.3