From be508a447be199b24a3bb856adb64a6fbd016e9e Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 15 Aug 2019 22:04:07 +0200 Subject: Splash.c: nxagentRemoveSplashWindow: drop unused parameter --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 339994e6c..7020a679e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -380,7 +380,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch)) { - nxagentRemoveSplashWindow(NULL); + nxagentRemoveSplashWindow(); } nxagentClients = nClients; @@ -590,7 +590,7 @@ ProcReparentWindow(register ClientPtr client) if (!nxagentWMPassed) { - nxagentRemoveSplashWindow(pWin); + nxagentRemoveSplashWindow(); } pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, -- cgit v1.2.3 From b04b58badd9007cc92cb9fc68ecb85c3e3388e25 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 16 Aug 2019 12:55:28 +0200 Subject: nxagent: add NXAGENT_ONSTART where missing There were some locations referenceing a variable that was only availabe with NXAGENT_ONSTART set --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 7020a679e..c49cae51e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -141,7 +141,9 @@ void nxagentWaitDisplay(void); void nxagentListRemoteFonts(const char *, int); +#ifdef NXAGENT_ONSTART unsigned int nxagentWMtimeout = 0; +#endif Bool nxagentWMPassed = False; /* -- cgit v1.2.3 From ab80152370da820cb42f22a500c1342bbb3ca3c8 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 16 Aug 2019 13:02:01 +0200 Subject: nxagent: move nxagentWMPassed to Splash.c It is only relevant there. --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index c49cae51e..0ad26b0bb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -144,7 +144,6 @@ void nxagentListRemoteFonts(const char *, int); #ifdef NXAGENT_ONSTART unsigned int nxagentWMtimeout = 0; #endif -Bool nxagentWMPassed = False; /* * Timeouts based on screen saver time. @@ -380,9 +379,9 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio * that the agent is ready. */ - if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch)) + if (nxagentWMtimeout < currentDispatch) { - nxagentRemoveSplashWindow(); + nxagentRemoveSplashWindow(); } nxagentClients = nClients; @@ -590,10 +589,7 @@ ProcReparentWindow(register ClientPtr client) if (!pWin) return(BadWindow); - if (!nxagentWMPassed) - { - nxagentRemoveSplashWindow(); - } + nxagentRemoveSplashWindow(); pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, DixWriteAccess); -- cgit v1.2.3 From c34d1b2011236c7b69dac09b78cdfb972e20ef6a Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 16 Aug 2019 13:08:42 +0200 Subject: NXdispatch.c: drop currentDispatch variable was only used once --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 0ad26b0bb..da7a55b69 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -244,8 +244,6 @@ Dispatch(void) register HWEventQueuePtr* icheck = checkForInput; long start_tick; - unsigned long currentDispatch = 0; - nextFreeClientID = 1; InitSelections(); nClients = 0; @@ -371,18 +369,15 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio #ifdef NXAGENT_ONSTART - currentDispatch = GetTimeInMillis(); - - /* - * If the timeout is expired set the - * selection informing the NX client - * that the agent is ready. - */ + /* + * If the timeout is expired set the selection informing the + * NX client that the agent is ready. + */ - if (nxagentWMtimeout < currentDispatch) - { - nxagentRemoveSplashWindow(); - } + if (nxagentWMtimeout < GetTimeInMillis()) + { + nxagentRemoveSplashWindow(); + } nxagentClients = nClients; -- cgit v1.2.3 From 3563959c011c00dcbd9dace4d882b222aa31b27f Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 16 Aug 2019 13:11:38 +0200 Subject: NXdispatch.c: move nxagentWMtimeout into the function it is only used there, no need for a global variable --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index da7a55b69..10616834e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -141,10 +141,6 @@ void nxagentWaitDisplay(void); void nxagentListRemoteFonts(const char *, int); -#ifdef NXAGENT_ONSTART -unsigned int nxagentWMtimeout = 0; -#endif - /* * Timeouts based on screen saver time. */ @@ -264,12 +260,11 @@ Dispatch(void) #ifdef NXAGENT_ONSTART /* - * Set NX_WM property (used by NX client to identify - * the agent's window) three seconds since the first - * client connects. + * Set NX_WM property (used by NX client to identify the agent's + * window) three seconds since the first client connects. */ - nxagentWMtimeout = GetTimeInMillis() + 3000; + unsigned int nxagentWMtimeout = GetTimeInMillis() + 3000; #endif -- cgit v1.2.3