Commit 37383646 authored by Mike Gabriel's avatar Mike Gabriel

Call checkX2goAgent much earlier (in ddxProcessArgument) and adapt…

Call checkX2goAgent much earlier (in ddxProcessArgument) and adapt NXAGENTWINDOWNAMELENGTH to its result.
parent 4d6bae08
......@@ -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");
}
}
/*
......
......@@ -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.
*/
......
......@@ -46,6 +46,7 @@ extern int nxagentBackingStore;
extern int nxagentSaveUnder;
extern int nxagentX2go;
void checkX2goAgent(void);
extern ServerGrabInfoRec nxagentGrabServerInfo;
......
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