Commit 2f7f39b4 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Keyboard.c: Fix and simplify keyboard config file handling

keyboard config file for nxagent/x2goagent was broken from the moment it got implemented. nxagentXkbConfigFilePath had never been filled.
parent 8793e362
......@@ -871,8 +871,6 @@ XkbError:
FILE *file;
XkbConfigRtrnRec config;
int nxagentXkbConfigFilePathSize;
char *nxagentXkbConfigFilePath;
XkbComponentNamesRec names;
......@@ -1019,22 +1017,15 @@ XkbError:
XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb);
if (nxagentX2go)
nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO);
nxagentXkbConfigFilePath = strdup(XKB_CONFIG_FILE_X2GO);
else
nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX);
nxagentXkbConfigFilePath = malloc((nxagentXkbConfigFilePathSize + 1) * sizeof(char));
nxagentXkbConfigFilePath = strdup(XKB_CONFIG_FILE_NX);
if ( nxagentXkbConfigFilePath == NULL)
if (nxagentXkbConfigFilePath == NULL)
{
FatalError("nxagentKeyboardProc: malloc failed.");
}
if (nxagentX2go)
nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_X2GO);
else
nxagentXkbConfigFilePathSize = strlen(XKB_CONFIG_FILE_NX);
#ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: nxagentXkbConfigFilePath [%s].\n",
nxagentXkbConfigFilePath);
......
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