aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index b7a054913..4a9ae73ae 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -691,11 +691,7 @@ ProcConvertSelection(register ClientPtr client)
(stuff->selection == MakeAtom("CLIPBOARD", 9, 0))) &&
nxagentOption(Clipboard) != ClipboardNone)
{
- int i = 0;
-
- while ((i < NumCurrentSelections) &&
- CurrentSelections[i].selection != stuff->selection) i++;
-
+ int i = nxagentFindCurrentSelectionIndex(stuff->selection);
if ((i < NumCurrentSelections) && (CurrentSelections[i].window != None))
{
if (nxagentConvertSelection(client, pWin, stuff->selection, stuff->requestor,