From f05a2eca579e17c8d7d0b3327e794d1f615e432a Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 17 Nov 2019 18:56:54 +0100 Subject: Clipboard.c: fix timeout comparison We had comparisions for >5000 and <5000, but =5000 was not explicitly handled. In that case the code took an unexpected path. --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 2b8a6f9b0..3a5488d18 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1698,7 +1698,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, fprintf(stderr, "%s: lastClientWindowPtr != NULL.\n", __func__); #endif - if ((GetTimeInMillis() - lastClientReqTime) > 5000) + if ((GetTimeInMillis() - lastClientReqTime) >= 5000) { #ifdef DEBUG fprintf(stderr, "%s: timeout expired on last request, " @@ -1858,7 +1858,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, lastClientTarget = target; /* if the last client request time is more than 5s ago update it. Why? */ - if ((GetTimeInMillis() - lastClientReqTime) > 5000) + if ((GetTimeInMillis() - lastClientReqTime) >= 5000) lastClientReqTime = GetTimeInMillis(); if (selection == MakeAtom("CLIPBOARD", 9, 0)) -- cgit v1.2.3