From a6c57d6ff5f6ce86074e3b499a0bf255741a76e7 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 5 Aug 2019 17:57:37 +0200 Subject: Clipboard.c: improve readability by using an if clause --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Clipboard.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 9ec160650..c11da0f96 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1562,8 +1562,9 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection, lastClientSelection = selection; lastClientTarget = target; - lastClientReqTime = (GetTimeInMillis() - lastClientReqTime) > 5000 ? - GetTimeInMillis() : lastClientReqTime; + /* if the last client request time is more than 5s ago update it. Why? */ + if ((GetTimeInMillis() - lastClientReqTime) > 5000) + lastClientReqTime = GetTimeInMillis(); if (selection == MakeAtom("CLIPBOARD", 9, 0)) { -- cgit v1.2.3