aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2021-11-10 23:53:06 +0100
committerUlrich Sibiller <uli42@gmx.de>2021-11-18 22:40:03 +0100
commit7b22b2d40d2d5012d07059579ceeb9f0b8dcf041 (patch)
tree48e568a80d1b677e6f9c42f87f9869a35946bae3
parenta86957b9173ae5652323027fc9c1dab933648e3b (diff)
downloadnx-libs-7b22b2d40d2d5012d07059579ceeb9f0b8dcf041.tar.gz
nx-libs-7b22b2d40d2d5012d07059579ceeb9f0b8dcf041.tar.bz2
nx-libs-7b22b2d40d2d5012d07059579ceeb9f0b8dcf041.zip
Clipboard.c: use a TimeStamp datatype for lastTimeChanged as dix does
just to be consistent with dix.
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 2e47709f7..fe0267ab5 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -109,7 +109,7 @@ typedef struct _SelectionOwner
ClientPtr client; /* local client */
Window window; /* local window id */
WindowPtr windowPtr; /* local window struct */
- Time lastTimeChanged; /* local time (server time) */
+ TimeStamp lastTimeChanged; /* local time (server time) */
} SelectionOwner;
/*
@@ -373,7 +373,7 @@ static void printSelectionStat(int index)
fprintf(stderr, " lastSelectionOwner[].windowPtr [%p] (-> [0x%x])\n", (void *)lOwner.windowPtr, WINDOWID(lOwner.windowPtr));
else
fprintf(stderr, " lastSelectionOwner[].windowPtr -\n");
- fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lOwner.lastTimeChanged);
+ fprintf(stderr, " lastSelectionOwner[].lastTimeChanged [%u]\n", lOwner.lastTimeChanged.milliseconds);
fprintf(stderr, " CurrentSelections[].client %s\n", nxagentClientInfoString(curSel.client));
fprintf(stderr, " CurrentSelections[].window [0x%x]\n", curSel.window);
@@ -697,7 +697,7 @@ static void initSelectionOwnerData(int index)
lastSelectionOwner[index].client = NullClient;
lastSelectionOwner[index].window = screenInfo.screens[0]->root->drawable.id;
lastSelectionOwner[index].windowPtr = NULL;
- lastSelectionOwner[index].lastTimeChanged = GetTimeInMillis();
+ lastSelectionOwner[index].lastTimeChanged = ClientTimeToServerTime(CurrentTime);
}
/* there's no owner on nxagent side anymore */
@@ -706,7 +706,7 @@ static void clearSelectionOwnerData(int index)
lastSelectionOwner[index].client = NullClient;
lastSelectionOwner[index].window = None;
lastSelectionOwner[index].windowPtr = NULL;
- lastSelectionOwner[index].lastTimeChanged = GetTimeInMillis();
+ lastSelectionOwner[index].lastTimeChanged = ClientTimeToServerTime(CurrentTime);
}
static void storeSelectionOwnerData(int index, Selection *sel)
@@ -714,7 +714,7 @@ static void storeSelectionOwnerData(int index, Selection *sel)
lastSelectionOwner[index].client = sel->client;
lastSelectionOwner[index].window = sel->window;
lastSelectionOwner[index].windowPtr = sel->pWin;
- lastSelectionOwner[index].lastTimeChanged = GetTimeInMillis();
+ lastSelectionOwner[index].lastTimeChanged = ClientTimeToServerTime(CurrentTime);
}
static Bool matchSelectionOwner(int index, ClientPtr pClient, WindowPtr pWindow)
@@ -2394,16 +2394,7 @@ static void setSelectionOwnerOnXServer(Selection *pSelection)
}
#ifdef DEBUG
- fprintf(stderr, "%s: lastSelectionOwner.client %s -> %s\n", __func__,
- nxagentClientInfoString(lastSelectionOwner[index].client),
- nxagentClientInfoString(pSelection->client));
- fprintf(stderr, "%s: lastSelectionOwner.window [0x%x] -> [0x%x]\n", __func__,
- lastSelectionOwner[index].window, pSelection->window);
- fprintf(stderr, "%s: lastSelectionOwner.windowPtr [%p] -> [%p] [0x%x] (serverWindow: [0x%lx])\n", __func__,
- (void *)lastSelectionOwner[index].windowPtr, (void *)pSelection->pWin,
- pSelection->pWin ? nxagentWindow(pSelection->pWin) : 0, serverWindow);
- fprintf(stderr, "%s: lastSelectionOwner.lastTimeChanged [%u]\n", __func__,
- lastSelectionOwner[index].lastTimeChanged);
+ printSelectionStat(index);
#endif