From a8d7b0c8c68d95e465fc05a1f49cfff4e969a0f5 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 10 Nov 2021 22:32:47 +0100 Subject: NXdispatch.c: use defined value CurrentTime instead of 0 also add another comment. --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 5df008bbb..cd57182a1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -215,14 +215,16 @@ InitSelections(void) NumCurrentSelections += nxagentMaxSelections; CurrentSelections = newsels; + /* Note: these are the same values that will be set on a SelectionClear event */ + CurrentSelections[nxagentPrimarySelection].selection = XA_PRIMARY; - CurrentSelections[nxagentPrimarySelection].lastTimeChanged = ClientTimeToServerTime(0); + CurrentSelections[nxagentPrimarySelection].lastTimeChanged = ClientTimeToServerTime(CurrentTime); CurrentSelections[nxagentPrimarySelection].window = screenInfo.screens[0]->root->drawable.id; CurrentSelections[nxagentPrimarySelection].pWin = NULL; CurrentSelections[nxagentPrimarySelection].client = NullClient; CurrentSelections[nxagentClipboardSelection].selection = MakeAtom("CLIPBOARD", 9, 1); - CurrentSelections[nxagentClipboardSelection].lastTimeChanged = ClientTimeToServerTime(0); + CurrentSelections[nxagentClipboardSelection].lastTimeChanged = ClientTimeToServerTime(CurrentTime); CurrentSelections[nxagentClipboardSelection].window = screenInfo.screens[0]->root->drawable.id; CurrentSelections[nxagentClipboardSelection].pWin = NULL; CurrentSelections[nxagentClipboardSelection].client = NullClient; -- cgit v1.2.3