diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-04-14 03:05:17 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-08-24 23:53:25 +0200 |
commit | 373836468b2c21f1c3706e521a603b9dba9dd41a (patch) | |
tree | c79bd6c745345f0c3b8d54fc7c1bb20d5595aa0c /nx-X11 | |
parent | 4d6bae08291f85794948ec5d7e839a0aa583a32f (diff) | |
download | nx-libs-373836468b2c21f1c3706e521a603b9dba9dd41a.tar.gz nx-libs-373836468b2c21f1c3706e521a603b9dba9dd41a.tar.bz2 nx-libs-373836468b2c21f1c3706e521a603b9dba9dd41a.zip |
Call checkX2goAgent much earlier (in ddxProcessArgument) and adapt NXAGENTWINDOWNAMELENGTH to its result.
Diffstat (limited to 'nx-X11')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Args.c | 15 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Init.c | 7 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Init.h | 1 |
3 files changed, 16 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 801ee0b22..cdcde1224 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -56,6 +56,7 @@ is" without express or implied warranty. #include "servermd.h" #include "opaque.h" +#include "Init.h" #include "Agent.h" #include "Display.h" #include "Args.h" @@ -189,6 +190,11 @@ int ddxProcessArgument(int argc, char *argv[], int i) nxagentProgName = argv[0]; + /* + * Check if we running as X2Go Agent + */ + checkX2goAgent(); + static Bool resetOptions = True; if (resetOptions == True) @@ -1805,7 +1811,14 @@ N/A if (*nxagentWindowName == '\0') { - snprintf(nxagentWindowName, NXAGENTWINDOWNAMELENGTH, "NX"); + if(nxagentX2go) + { + snprintf(nxagentWindowName, NXAGENTWINDOWNAMELENGTH, "X2Go Agent"); + } + else + { + snprintf(nxagentWindowName, NXAGENTWINDOWNAMELENGTH, "NX Agent"); + } } /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 12f7f0b06..01acbbc16 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -192,7 +192,7 @@ int nxagentX2go; * Checking if agent is x2go agent */ -void checkX2goAgent() +void checkX2goAgent(void) { extern const char *nxagentProgName; if( strcasecmp(nxagentProgName,"x2goagent") == 0) @@ -221,11 +221,6 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[]) #endif /* - * Check if we running as X2Go Agent - */ - checkX2goAgent(); - - /* * Print our pid and version information. */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.h b/nx-X11/programs/Xserver/hw/nxagent/Init.h index 34a17067f..1bea17600 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.h @@ -46,6 +46,7 @@ extern int nxagentBackingStore; extern int nxagentSaveUnder; extern int nxagentX2go; +void checkX2goAgent(void); extern ServerGrabInfoRec nxagentGrabServerInfo; |