aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-11-18 07:38:16 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-05 23:36:02 +0100
commit5d1577abed04e7ea413616232248c7058f960492 (patch)
tree5116d123bc1f08a0c08d59adf14cb0b254515901 /nx-X11
parent634d4fc8174dcd5adac2b4e20bfbacdb8385f065 (diff)
downloadnx-libs-5d1577abed04e7ea413616232248c7058f960492.tar.gz
nx-libs-5d1577abed04e7ea413616232248c7058f960492.tar.bz2
nx-libs-5d1577abed04e7ea413616232248c7058f960492.zip
Clipboard.c: reorder nxagentInitClipboard
It makes sense to measure time and set the initialized flag right at the start.
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index e77984472..44948859d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -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