aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-01-03 00:20:49 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-05 21:44:12 +0100
commita59020b1d4c7a7b23cae328067b589a2aa1d787f (patch)
treeabaa733e7defdc31a77da070d42d3fd8b573c52a /nx-X11/programs
parent69443952be6e3ae340b034d9ab158a919c68bb55 (diff)
downloadnx-libs-a59020b1d4c7a7b23cae328067b589a2aa1d787f.tar.gz
nx-libs-a59020b1d4c7a7b23cae328067b589a2aa1d787f.tar.bz2
nx-libs-a59020b1d4c7a7b23cae328067b589a2aa1d787f.zip
nxagent: central check for keyboard clone mode
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c15
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c9
3 files changed, 14 insertions, 18 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index 804c6e91e..339c6d85b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -687,7 +687,20 @@ int ddxProcessArgument(int argc, char *argv[], int i)
{
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)
{
FatalError("malloc failed");
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 90a4262d7..c6756b1cc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -553,14 +553,6 @@ XkbError:
fprintf(stderr, "%s: nxagentKeyboard is [%s].\n", __func__, validateString(nxagentKeyboard));
#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:
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index e29fc3200..69a3011f9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -458,15 +458,6 @@ Bool nxagentReconnectSession(void)
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)
{