Commit f05a2eca authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

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.
parent b2af0c68
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment