Commit 26b033b8 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

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
parent 4dfe84ea
...@@ -584,6 +584,17 @@ Bool nxagentReconnectSession(void) ...@@ -584,6 +584,17 @@ Bool nxagentReconnectSession(void)
goto nxagentReconnectError; 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 && if (nxagentOption(ResetKeyboardAtResume) == 1 &&
(nxagentKeyboard == NULL || nxagentOldKeyboard == NULL || (nxagentKeyboard == NULL || nxagentOldKeyboard == NULL ||
strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 || strcmp(nxagentKeyboard, nxagentOldKeyboard) != 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