From 634d4fc8174dcd5adac2b4e20bfbacdb8385f065 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 18 Nov 2019 01:35:50 +0100 Subject: Clipboard.c: clear all selections in nxagentInitClipboard The new code effectively does the same the old one did. But if we change the number of selections the new code will still work correctly while the old one would not. --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index a3d8fb5c1..e77984472 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -2256,8 +2256,10 @@ Bool nxagentInitClipboard(WindowPtr pWin) } else { - nxagentClearSelectionOwner(nxagentPrimarySelection); - nxagentClearSelectionOwner(nxagentClipboardSelection); + for (int i = 0; i < nxagentMaxSelections; i++) + { + nxagentClearSelectionOwner(i); + } lastServerRequestor = None; -- cgit v1.2.3