Commit a59020b1 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

nxagent: central check for keyboard clone mode

parent 69443952
...@@ -687,7 +687,20 @@ int ddxProcessArgument(int argc, char *argv[], int i) ...@@ -687,7 +687,20 @@ int ddxProcessArgument(int argc, char *argv[], int i)
{ {
SAFE_free(nxagentKeyboard); SAFE_free(nxagentKeyboard);
nxagentKeyboard = strdup(argv[i]); if (nxagentX2go && strcmp(argv[i], "null/null") == 0)
{
#ifdef TEST
fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__);
#endif
SAFE_free(nxagentKeyboard);
nxagentKeyboard = strdup("clone");
}
else
{
nxagentKeyboard = strdup(argv[i]);
}
if (nxagentKeyboard == NULL) if (nxagentKeyboard == NULL)
{ {
FatalError("malloc failed"); FatalError("malloc failed");
......
...@@ -553,14 +553,6 @@ XkbError: ...@@ -553,14 +553,6 @@ XkbError:
fprintf(stderr, "%s: nxagentKeyboard is [%s].\n", __func__, validateString(nxagentKeyboard)); fprintf(stderr, "%s: nxagentKeyboard is [%s].\n", __func__, validateString(nxagentKeyboard));
#endif #endif
if (nxagentX2go && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0))
{
#ifdef TEST
fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__);
#endif
SAFE_free(nxagentKeyboard);
nxagentKeyboard = strdup("clone");
}
/* /*
from nxagent changelog: from nxagent changelog:
......
...@@ -458,15 +458,6 @@ Bool nxagentReconnectSession(void) ...@@ -458,15 +458,6 @@ Bool nxagentReconnectSession(void)
nxagentProcessOptions(nxagentOptionsFilenameOrString); nxagentProcessOptions(nxagentOptionsFilenameOrString);
if (nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0))
{
#ifdef TEST
fprintf(stderr, "nxagentReconnect: changing nxagentKeyboard from [null/null] to [clone].\n");
#endif
SAFE_free(nxagentKeyboard);
nxagentKeyboard = strdup("clone");
}
if (nxagentReconnectDisplay(reconnectLossyLevel[DISPLAY_STEP]) == 0) if (nxagentReconnectDisplay(reconnectLossyLevel[DISPLAY_STEP]) == 0)
{ {
......
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