Commit 5d1577ab authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Clipboard.c: reorder nxagentInitClipboard

It makes sense to measure time and set the initialized flag right at the start.
parent 634d4fc8
......@@ -2127,6 +2127,16 @@ Bool nxagentInitClipboard(WindowPtr pWin)
fprintf(stderr, "%s: Got called.\n", __func__);
#endif
#ifdef NXAGENT_TIMESTAMP
{
fprintf(stderr, "%s: Clipboard init starts at [%ld] ms.\n", __func__,
GetTimeInMillis() - startTime);
}
#endif
agentClipboardInitialized = False;
serverWindow = nxagentWindow(pWin);
if (!nxagentReconnectTrap)
{
SAFE_free(lastSelectionOwner);
......@@ -2147,15 +2157,6 @@ Bool nxagentInitClipboard(WindowPtr pWin)
lastSelectionOwner[nxagentClipboardSelection].selection = nxagentAtoms[10]; /* CLIPBOARD */
}
#ifdef NXAGENT_TIMESTAMP
{
fprintf(stderr, "%s: Initializing start [%ld] milliseconds.\n", __func__,
GetTimeInMillis() - startTime);
}
#endif
agentClipboardInitialized = False;
serverWindow = nxagentWindow(pWin);
serverTARGETS = nxagentAtoms[6]; /* TARGETS */
serverTEXT = nxagentAtoms[7]; /* TEXT */
......@@ -2294,7 +2295,7 @@ Bool nxagentInitClipboard(WindowPtr pWin)
#ifdef NXAGENT_TIMESTAMP
{
fprintf(stderr, "%s: initializing ends [%ld] milliseconds.\n", __func__,
fprintf(stderr, "%s: Clipboard init ends at [%ld] ms.\n", __func__,
GetTimeInMillis() - startTime);
}
#endif
......
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