aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-11-18 01:35:50 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-05 23:36:02 +0100
commit634d4fc8174dcd5adac2b4e20bfbacdb8385f065 (patch)
treeb46f9df82da717f408f1307f05a6df287112e445 /nx-X11/programs/Xserver
parent20120205bb93b1195b59b68e452f90a6e394075c (diff)
downloadnx-libs-634d4fc8174dcd5adac2b4e20bfbacdb8385f065.tar.gz
nx-libs-634d4fc8174dcd5adac2b4e20bfbacdb8385f065.tar.bz2
nx-libs-634d4fc8174dcd5adac2b4e20bfbacdb8385f065.zip
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.
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c6
1 files changed, 4 insertions, 2 deletions
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;