aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-12-03 21:34:40 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-12-19 12:30:22 +0100
commit26b033b84e682bfe098711204418319f753a34dc (patch)
treefdf511f26aff06042430a518029875b0d27b3477
parent4dfe84eafb3838e1b54f81450369c0b8e3bb8350 (diff)
downloadnx-libs-26b033b84e682bfe098711204418319f753a34dc.tar.gz
nx-libs-26b033b84e682bfe098711204418319f753a34dc.tar.bz2
nx-libs-26b033b84e682bfe098711204418319f753a34dc.zip
Reconnect.c: restore old keyboard value if no new one is given
It may not fully fix the issue mentioned below but it does for the -keyboard commandline option at least. Fixes ArcticaProject/nx-libs#741
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index 6d15f2021..4b1ae03f9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -584,6 +584,17 @@ Bool nxagentReconnectSession(void)
goto nxagentReconnectError;
}
+ /* if there's no keyboard definition in the options file
+ restore the previous value. */
+ #ifdef DEBUG
+ fprintf(stderr, "%s: nxagentKeyboard [%s] nxagentOldKeyboard [%s]\n", __func__, nxagentKeyboard, nxagentOldKeyboard);
+ #endif
+ if (nxagentKeyboard == NULL)
+ {
+ nxagentKeyboard = nxagentOldKeyboard;
+ nxagentOldKeyboard = NULL;
+ }
+
if (nxagentOption(ResetKeyboardAtResume) == 1 &&
(nxagentKeyboard == NULL || nxagentOldKeyboard == NULL ||
strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 ||