Unverified Commit 60e0566d authored by Mike Gabriel's avatar Mike Gabriel

Merge branch 'uli42-pr/fix_keyconv_on_reconnect' into 3.6.x

parents cf24c658 6f390f82
...@@ -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");
...@@ -1489,27 +1502,36 @@ static void nxagentParseOptionString(char *string) ...@@ -1489,27 +1502,36 @@ static void nxagentParseOptionString(char *string)
char *option = NULL; char *option = NULL;
/* /*
* we must not modify string, but strtok will insert \0. So let's
* work with a copy
*/
char *dup = strdup(string);
/*
* Remove the port specification. * Remove the port specification.
*/ */
char *delimiter = rindex(string, ':'); char *delimiter = rindex(dup, ':');
if (delimiter) if (delimiter)
{ {
*delimiter = 0; #ifdef DEBUG
fprintf(stderr, "%s: stripping port specification [%s]\n", __func__, delimiter);
#endif
*delimiter = '\0';
} }
else else
{ {
fprintf(stderr, "Warning: Option file doesn't contain a port specification.\n"); fprintf(stderr, "Warning: Option file doesn't contain a port specification.\n");
} }
while ((option = strtok(option ? NULL : string, ","))) while ((option = strtok(option ? NULL : dup, ",")))
{ {
delimiter = rindex(option, '='); delimiter = rindex(option, '=');
if (delimiter) if (delimiter)
{ {
*delimiter = 0; *delimiter = '\0';
value = delimiter + 1; value = delimiter + 1;
} }
else else
...@@ -1519,6 +1541,31 @@ static void nxagentParseOptionString(char *string) ...@@ -1519,6 +1541,31 @@ static void nxagentParseOptionString(char *string)
nxagentParseSingleOption(option, value); nxagentParseSingleOption(option, value);
} }
SAFE_free(dup);
}
char *nxagentSkipNXMarker(char *string)
{
if (strncasecmp(string, "nx/nx,", 6) == 0 ||
strncasecmp(string, "nx/nx:", 6) == 0)
{
#ifdef DEBUG
fprintf(stderr, "%s: skipping [%6.6s]\n", __func__, string);
#endif
return string + 6;
}
else if (strncasecmp(string, "nx,", 3) == 0 ||
strncasecmp(string, "nx:", 3) == 0)
{
#ifdef DEBUG
fprintf(stderr, "%s: skipping [%3.3s]\n", __func__, string);
#endif
return string + 3;
}
else
{
return string;
}
} }
void nxagentProcessOptions(char * string) void nxagentProcessOptions(char * string)
...@@ -1533,15 +1580,10 @@ void nxagentProcessOptions(char * string) ...@@ -1533,15 +1580,10 @@ void nxagentProcessOptions(char * string)
/* if the "filename" starts with an nx marker treat it /* if the "filename" starts with an nx marker treat it
as an option _string_ instead of a filename */ as an option _string_ instead of a filename */
if (strncasecmp(string, "nx/nx,", 6) == 0 || char *skipped = nxagentSkipNXMarker(string);
strncasecmp(string, "nx/nx:", 6) == 0) if (skipped != string)
{
nxagentParseOptionString(string + 6);
}
else if (strncasecmp(string, "nx,", 3) == 0 ||
strncasecmp(string, "nx:", 3) == 0)
{ {
nxagentParseOptionString(string + 3); nxagentParseOptionString(skipped);
} }
else else
{ {
...@@ -1650,9 +1692,13 @@ void nxagentProcessOptionsFile(char * filename) ...@@ -1650,9 +1692,13 @@ void nxagentProcessOptionsFile(char * filename)
for (offset = 0; (offset < sizeOfFile) && (data[offset] != '\n'); offset++); for (offset = 0; (offset < sizeOfFile) && (data[offset] != '\n'); offset++);
data[offset] = 0; data[offset] = '\0';
#ifdef DEBUG
fprintf(stderr, "%s: first line of options file [%s]\n", __func__, data);
#endif
nxagentParseOptionString(data); nxagentParseOptionString(nxagentSkipNXMarker(data));
nxagentProcessOptionsFileExit: nxagentProcessOptionsFileExit:
......
...@@ -250,7 +250,7 @@ CARD8 nxagentConvertKeycode(CARD8 k) ...@@ -250,7 +250,7 @@ CARD8 nxagentConvertKeycode(CARD8 k)
{ {
#ifdef DEBUG #ifdef DEBUG
if (k != nxagentConvertedKeycodes[k]) if (k != nxagentConvertedKeycodes[k])
fprintf(stderr, "nxagentConvertKeycode: converting keycode [%d] to [%d]\n", k, nxagentConvertedKeycodes[k]); fprintf(stderr, "%s: converting keycode [%d] to [%d]\n", __func__, k, nxagentConvertedKeycodes[k]);
#endif #endif
return nxagentConvertedKeycodes[k]; return nxagentConvertedKeycodes[k];
...@@ -276,13 +276,10 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) ...@@ -276,13 +276,10 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl)
{ {
#ifdef XKB #ifdef XKB
XkbSrvInfoPtr xkbi;
XkbControlsPtr xkbc;
if (!noXkbExtension) if (!noXkbExtension)
{ {
xkbi = pDev -> key -> xkbInfo; XkbSrvInfoPtr xkbi = pDev -> key -> xkbInfo;
xkbc = xkbi -> desc -> ctrls; XkbControlsPtr xkbc = xkbi -> desc -> ctrls;
/* /*
* We want to prevent agent generating auto-repeated * We want to prevent agent generating auto-repeated
...@@ -292,7 +289,7 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) ...@@ -292,7 +289,7 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl)
*/ */
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentChangeKeyboardControl: Repeat delay was [%d] interval was [%d].\n", fprintf(stderr, "%s: Repeat delay was [%d] interval was [%d].\n", __func__,
xkbc -> repeat_delay, xkbc -> repeat_interval); xkbc -> repeat_delay, xkbc -> repeat_interval);
#endif #endif
...@@ -300,7 +297,7 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) ...@@ -300,7 +297,7 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl)
xkbc -> repeat_interval = ~ 0; xkbc -> repeat_interval = ~ 0;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentChangeKeyboardControl: Repeat delay is now [%d] interval is now [%d].\n", fprintf(stderr, "%s: Repeat delay is now [%d] interval is now [%d].\n", __func__,
xkbc -> repeat_delay, xkbc -> repeat_interval); xkbc -> repeat_delay, xkbc -> repeat_interval);
#endif #endif
} }
...@@ -314,22 +311,21 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) ...@@ -314,22 +311,21 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl)
if (nxagentOption(DeviceControl)) if (nxagentOption(DeviceControl))
{ {
unsigned long value_mask;
XKeyboardControl values;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentChangeKeyboardControl: WARNING! Propagating changes to keyboard settings.\n"); fprintf(stderr, "%s: WARNING! Propagating changes to keyboard settings.\n", __func__);
#endif #endif
value_mask = KBKeyClickPercent | unsigned long value_mask = KBKeyClickPercent |
KBBellPercent | KBBellPercent |
KBBellPitch | KBBellPitch |
KBBellDuration; KBBellDuration;
values.key_click_percent = ctrl->click; XKeyboardControl values = {
values.bell_percent = ctrl->bell; .key_click_percent = ctrl->click,
values.bell_pitch = ctrl->bell_pitch; .bell_percent = ctrl->bell,
values.bell_duration = ctrl->bell_duration; .bell_pitch = ctrl->bell_pitch,
.bell_duration = ctrl->bell_duration,
};
/* /*
* Don't propagate the auto repeat mode. It is forced to be * Don't propagate the auto repeat mode. It is forced to be
...@@ -363,19 +359,16 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) ...@@ -363,19 +359,16 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl)
} }
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentChangeKeyboardControl: WARNING! Not propagating changes to keyboard settings.\n"); fprintf(stderr, "%s: WARNING! Not propagating changes to keyboard settings.\n", __func__);
#endif #endif
} }
int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff) int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff)
{ {
XModifierKeymap *modifier_keymap;
KeySym *keymap; KeySym *keymap;
int mapWidth; int mapWidth;
int min_keycode, max_keycode; int min_keycode, max_keycode;
KeySymsRec keySyms;
CARD8 modmap[MAP_LENGTH]; CARD8 modmap[MAP_LENGTH];
int i, j;
XKeyboardState values; XKeyboardState values;
#ifdef XKB #ifdef XKB
char *model = NULL, *layout = NULL; char *model = NULL, *layout = NULL;
...@@ -387,7 +380,7 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff) ...@@ -387,7 +380,7 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff)
case DEVICE_INIT: case DEVICE_INIT:
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Called for [DEVICE_INIT].\n"); fprintf(stderr, "%s: Called for [DEVICE_INIT].\n", __func__);
#endif #endif
if (NXDisplayError(nxagentDisplay) == 1) if (NXDisplayError(nxagentDisplay) == 1)
...@@ -397,7 +390,7 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff) ...@@ -397,7 +390,7 @@ int nxagentKeyboardProc(DeviceIntPtr pDev, int onoff)
#ifdef WATCH #ifdef WATCH
fprintf(stderr, "nxagentKeyboardProc: Watchpoint 9.\n"); fprintf(stderr, "%s: Watchpoint 9.\n", __func__);
/* /*
Reply Total Cached Bits In Bits Out Bits/Reply Ratio Reply Total Cached Bits In Bits Out Bits/Reply Ratio
...@@ -421,11 +414,11 @@ N/A ...@@ -421,11 +414,11 @@ N/A
XkbDfltRepeatInterval = ~ 0; XkbDfltRepeatInterval = ~ 0;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Set repeat delay to [%d] interval to [%d].\n", fprintf(stderr, "%s: Set repeat delay to [%d] interval to [%d].\n", __func__,
XkbDfltRepeatDelay, XkbDfltRepeatInterval); XkbDfltRepeatDelay, XkbDfltRepeatInterval);
#endif #endif
modifier_keymap = XGetModifierMapping(nxagentDisplay); XModifierKeymap *modifier_keymap = XGetModifierMapping(nxagentDisplay);
if (modifier_keymap == NULL) if (modifier_keymap == NULL)
{ {
...@@ -435,9 +428,7 @@ N/A ...@@ -435,9 +428,7 @@ N/A
XDisplayKeycodes(nxagentDisplay, &min_keycode, &max_keycode); XDisplayKeycodes(nxagentDisplay, &min_keycode, &max_keycode);
#ifdef _XSERVER64 #ifdef _XSERVER64
{ {
KeySym64 *keymap64; KeySym64 *keymap64 = XGetKeyboardMapping(nxagentDisplay,
int len;
keymap64 = XGetKeyboardMapping(nxagentDisplay,
min_keycode, min_keycode,
max_keycode - min_keycode + 1, max_keycode - min_keycode + 1,
&mapWidth); &mapWidth);
...@@ -448,9 +439,9 @@ N/A ...@@ -448,9 +439,9 @@ N/A
return -1; return -1;
} }
len = (max_keycode - min_keycode + 1) * mapWidth; int len = (max_keycode - min_keycode + 1) * mapWidth;
keymap = (KeySym *)malloc(len * sizeof(KeySym)); keymap = (KeySym *)malloc(len * sizeof(KeySym));
for(i = 0; i < len; ++i) for(int i = 0; i < len; ++i)
{ {
keymap[i] = keymap64[i]; keymap[i] = keymap64[i];
} }
...@@ -479,9 +470,9 @@ N/A ...@@ -479,9 +470,9 @@ N/A
nxagentNumlockMask = 0; nxagentNumlockMask = 0;
memset(modmap, 0, sizeof(modmap)); memset(modmap, 0, sizeof(modmap));
for (j = 0; j < 8; j++) for (int j = 0; j < 8; j++)
{ {
for(i = 0; i < modifier_keymap->max_keypermod; i++) for(int i = 0; i < modifier_keymap->max_keypermod; i++)
{ {
CARD8 keycode; CARD8 keycode;
if ((keycode = if ((keycode =
...@@ -503,10 +494,12 @@ N/A ...@@ -503,10 +494,12 @@ N/A
nxagentCheckRemoteKeycodes(); nxagentCheckRemoteKeycodes();
keySyms.minKeyCode = min_keycode; KeySymsRec keySyms = {
keySyms.maxKeyCode = max_keycode; .minKeyCode = min_keycode,
keySyms.mapWidth = mapWidth; .maxKeyCode = max_keycode,
keySyms.map = keymap; .mapWidth = mapWidth,
.map = keymap,
};
#ifdef XKB #ifdef XKB
if (!nxagentGetRemoteXkbExtension()) if (!nxagentGetRemoteXkbExtension())
...@@ -517,13 +510,13 @@ N/A ...@@ -517,13 +510,13 @@ N/A
if (noXkbExtension) { if (noXkbExtension) {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: No XKB extension.\n"); fprintf(stderr, "%s: No XKB extension.\n", __func__);
#endif #endif
XkbError: XkbError:
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: XKB error.\n"); fprintf(stderr, "%s: XKB error.\n", __func__);
#endif #endif
#endif #endif
...@@ -540,7 +533,7 @@ XkbError: ...@@ -540,7 +533,7 @@ XkbError:
nxagentBell, nxagentChangeKeyboardControl); nxagentBell, nxagentChangeKeyboardControl);
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: InitKeyboardDeviceStruct returns [%d].\n", ret); fprintf(stderr, "%s: InitKeyboardDeviceStruct returns [%d].\n", __func__, ret);
} }
#endif #endif
...@@ -549,19 +542,17 @@ XkbError: ...@@ -549,19 +542,17 @@ XkbError:
XkbComponentNamesRec names = {0}; XkbComponentNamesRec names = {0};
char *rules = NULL, *variant = NULL, *options = NULL; /* use xkb default */ char *rules = NULL, *variant = NULL, *options = NULL; /* use xkb default */
/* handle empty string like the NULL pointer */
if (nxagentKeyboard && nxagentKeyboard[0] == '\0')
{
SAFE_free(nxagentKeyboard);
}
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Using XKB extension.\n"); fprintf(stderr, "%s: Using XKB extension.\n", __func__);
fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL"); 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:
...@@ -578,9 +569,10 @@ XkbError: ...@@ -578,9 +569,10 @@ XkbError:
(strcmp(nxagentKeyboard, "query") != 0) && (strcmp(nxagentKeyboard, "query") != 0) &&
(strcmp(nxagentKeyboard, "clone") != 0)) (strcmp(nxagentKeyboard, "clone") != 0))
{ {
for (i = 0; nxagentKeyboard[i] != '/' && nxagentKeyboard[i] != 0; i++); int i;
for (i = 0; nxagentKeyboard[i] != '/' && nxagentKeyboard[i] != '\0'; i++);
if (nxagentKeyboard[i] == 0 || nxagentKeyboard[i + 1] == 0 || i == 0) if (nxagentKeyboard[i] == '\0' || nxagentKeyboard[i + 1] == '\0' || i == 0)
{ {
ErrorF("Warning: Wrong keyboard type: %s.\n", nxagentKeyboard); ErrorF("Warning: Wrong keyboard type: %s.\n", nxagentKeyboard);
goto XkbError; goto XkbError;
...@@ -629,8 +621,8 @@ XkbError: ...@@ -629,8 +621,8 @@ XkbError:
if (strcmp(model, "pc105") == 0) if (strcmp(model, "pc105") == 0)
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: WARNING! Keyboard model 'pc105' unsupported on Solaris.\n"); fprintf(stderr, "%s: WARNING! Keyboard model 'pc105' unsupported on Solaris.\n", __func__);
fprintf(stderr, "nxagentKeyboardProc: WARNING! Forcing keyboard model to 'pc104'.\n"); fprintf(stderr, "%s: WARNING! Forcing keyboard model to 'pc104'.\n", __func__);
#endif #endif
strcpy(model, "pc104"); strcpy(model, "pc104");
...@@ -641,13 +633,13 @@ XkbError: ...@@ -641,13 +633,13 @@ XkbError:
else else
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Using default keyboard: model [%s] layout [%s].\n", fprintf(stderr, "%s: Using default keyboard: model [%s] layout [%s].\n", __func__,
model?model:"(default)", layout?layout:"(default)"); model?model:"(default)", layout?layout:"(default)");
#endif #endif
} }
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Init XKB extension.\n"); fprintf(stderr, "%s: Init XKB extension.\n", __func__);
#endif #endif
if (nxagentRemoteRules && nxagentRemoteModel) if (nxagentRemoteRules && nxagentRemoteModel)
...@@ -657,8 +649,6 @@ XkbError: ...@@ -657,8 +649,6 @@ XkbError:
__func__, nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); __func__, nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions);
#endif #endif
/* Only setup keycode conversion if we are NOT in clone mode */
if (nxagentKeyboard && (strcmp(nxagentKeyboard, "clone") == 0)) if (nxagentKeyboard && (strcmp(nxagentKeyboard, "clone") == 0))
{ {
SAFE_free(rules); rules = strdup(nxagentRemoteRules); SAFE_free(rules); rules = strdup(nxagentRemoteRules);
...@@ -666,7 +656,15 @@ XkbError: ...@@ -666,7 +656,15 @@ XkbError:
SAFE_free(layout); layout = strdup(nxagentRemoteLayout); SAFE_free(layout); layout = strdup(nxagentRemoteLayout);
SAFE_free(variant); variant = strdup(nxagentRemoteVariant); SAFE_free(variant); variant = strdup(nxagentRemoteVariant);
SAFE_free(options); options = strdup(nxagentRemoteOptions); SAFE_free(options); options = strdup(nxagentRemoteOptions);
/*
/* Only setup keycode conversion if we are NOT in clone mode */
#ifdef DEBUG
fprintf(stderr, "%s: nxagentKeyboard is [%s] - disabling keycode conversion.\n", __func__,
nxagentKeyboard);
#endif
nxagentChangeOption(KeycodeConversion, KeycodeConversionOff);
/*
* when cloning we do not want X2Go to set the keyboard * when cloning we do not want X2Go to set the keyboard
* via a keyboard file generated by nxagent. The defined * via a keyboard file generated by nxagent. The defined
* method for switching that off is the creation of a dir * method for switching that off is the creation of a dir
...@@ -679,7 +677,6 @@ XkbError: ...@@ -679,7 +677,6 @@ XkbError:
} }
else else
{ {
nxagentKeycodeConversionSetup();
/* /*
* Keyboard has always been tricky with nxagent. For that * Keyboard has always been tricky with nxagent. For that
* reason X2Go offers "auto" keyboard configuration. You can * reason X2Go offers "auto" keyboard configuration. You can
...@@ -697,6 +694,7 @@ XkbError: ...@@ -697,6 +694,7 @@ XkbError:
nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions);
} }
} }
nxagentKeycodeConversionSetup();
} }
#ifdef DEBUG #ifdef DEBUG
else else
...@@ -714,13 +712,13 @@ XkbError: ...@@ -714,13 +712,13 @@ XkbError:
#ifdef TEST #ifdef TEST
else else
{ {
fprintf(stderr, "nxagentKeyboardProc: No current keyboard.\n"); fprintf(stderr, "%s: No current keyboard.\n", __func__);
} }
#endif #endif
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device: " fprintf(stderr, "%s: Going to set rules and init device: "
"[rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", "[rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", __func__,
rules?rules:"(default)", model?model:"(default)", layout?layout:"(default)", rules?rules:"(default)", model?model:"(default)", layout?layout:"(default)",
variant?variant:"(default)", options?options:"(default)"); variant?variant:"(default)", options?options:"(default)");
#endif #endif
...@@ -761,7 +759,7 @@ XkbError: ...@@ -761,7 +759,7 @@ XkbError:
#ifdef WATCH #ifdef WATCH
fprintf(stderr, "nxagentKeyboardProc: Watchpoint 10.\n"); fprintf(stderr, "%s: Watchpoint 10.\n", __func__);
/* /*
Reply Total Cached Bits In Bits Out Bits/Reply Ratio Reply Total Cached Bits In Bits Out Bits/Reply Ratio
...@@ -785,7 +783,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio ...@@ -785,7 +783,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
case DEVICE_ON: case DEVICE_ON:
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Called for [DEVICE_ON].\n"); fprintf(stderr, "%s: Called for [DEVICE_ON].\n", __func__);
#endif #endif
if (NXDisplayError(nxagentDisplay) == 1) if (NXDisplayError(nxagentDisplay) == 1)
...@@ -795,7 +793,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio ...@@ -795,7 +793,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
#ifdef WATCH #ifdef WATCH
fprintf(stderr, "nxagentKeyboardProc: Watchpoint 11.\n"); fprintf(stderr, "%s: Watchpoint 11.\n", __func__);
/* /*
Reply Total Cached Bits In Bits Out Bits/Reply Ratio Reply Total Cached Bits In Bits Out Bits/Reply Ratio
...@@ -814,7 +812,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio ...@@ -814,7 +812,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
case DEVICE_OFF: case DEVICE_OFF:
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Called for [DEVICE_OFF].\n"); fprintf(stderr, "%s: Called for [DEVICE_OFF].\n", __func__);
#endif #endif
if (NXDisplayError(nxagentDisplay) == 1) if (NXDisplayError(nxagentDisplay) == 1)
...@@ -828,7 +826,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio ...@@ -828,7 +826,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
case DEVICE_CLOSE: case DEVICE_CLOSE:
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentKeyboardProc: Called for [DEVICE_CLOSE].\n"); fprintf(stderr, "%s: Called for [DEVICE_CLOSE].\n", __func__);
#endif #endif
break; break;
...@@ -871,7 +869,6 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode) ...@@ -871,7 +869,6 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode)
#endif #endif
int i;
xEvent event = {0}; xEvent event = {0};
event.u.u.type = MappingNotify; event.u.u.type = MappingNotify;
...@@ -884,7 +881,7 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode) ...@@ -884,7 +881,7 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode)
* 0 is the server client * 0 is the server client
*/ */
for (i = 1; i < currentMaxClients; i++) for (int i = 1; i < currentMaxClients; i++)
{ {
if (clients[i] && clients[i] -> clientState == ClientStateRunning) if (clients[i] && clients[i] -> clientState == ClientStateRunning)
{ {
...@@ -906,14 +903,9 @@ int nxagentResetKeyboard(void) ...@@ -906,14 +903,9 @@ int nxagentResetKeyboard(void)
DeviceIntPtr dev = inputInfo.keyboard; DeviceIntPtr dev = inputInfo.keyboard;
DeviceIntPtr devBackup; DeviceIntPtr devBackup;
int result;
int oldMinKeycode = 8; int oldMinKeycode = 8;
int oldMaxKeycode = 255; int oldMaxKeycode = 255;
int savedBellPercent;
int savedBellPitch;
int savedBellDuration;
if (NXDisplayError(nxagentDisplay) == 1) if (NXDisplayError(nxagentDisplay) == 1)
{ {
return 0; return 0;
...@@ -923,19 +915,19 @@ int nxagentResetKeyboard(void) ...@@ -923,19 +915,19 @@ int nxagentResetKeyboard(void)
* Save bell settings. * Save bell settings.
*/ */
savedBellPercent = inputInfo.keyboard -> kbdfeed -> ctrl.bell; int savedBellPercent = inputInfo.keyboard -> kbdfeed -> ctrl.bell;
savedBellPitch = inputInfo.keyboard -> kbdfeed -> ctrl.bell_pitch; int savedBellPitch = inputInfo.keyboard -> kbdfeed -> ctrl.bell_pitch;
savedBellDuration = inputInfo.keyboard -> kbdfeed -> ctrl.bell_duration; int savedBellDuration = inputInfo.keyboard -> kbdfeed -> ctrl.bell_duration;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentResetKeyboard: bellPercent [%d] bellPitch [%d] bellDuration [%d].\n", fprintf(stderr, "%s: bellPercent [%d] bellPitch [%d] bellDuration [%d].\n", __func__,
savedBellPercent, savedBellPitch, savedBellDuration); savedBellPercent, savedBellPitch, savedBellDuration);
#endif #endif
if (!(devBackup = calloc(1, sizeof(DeviceIntRec)))) if (!(devBackup = calloc(1, sizeof(DeviceIntRec))))
{ {
#ifdef PANIC #ifdef PANIC
fprintf(stderr, "nxagentResetKeyboard: PANIC! Can't allocate backup structure.\n"); fprintf(stderr, "%s: PANIC! Can't allocate backup structure.\n", __func__);
#endif #endif
} }
...@@ -962,7 +954,7 @@ int nxagentResetKeyboard(void) ...@@ -962,7 +954,7 @@ int nxagentResetKeyboard(void)
nxagentTuneXkbWrapper(); nxagentTuneXkbWrapper();
#endif #endif
result = (*inputInfo.keyboard -> deviceProc)(inputInfo.keyboard, DEVICE_INIT); int result = (*inputInfo.keyboard -> deviceProc)(inputInfo.keyboard, DEVICE_INIT);
if (result == Success && inputInfo.keyboard -> key != NULL) if (result == Success && inputInfo.keyboard -> key != NULL)
{ {
...@@ -986,7 +978,7 @@ int nxagentResetKeyboard(void) ...@@ -986,7 +978,7 @@ int nxagentResetKeyboard(void)
else else
{ {
#ifdef WARNING #ifdef WARNING
fprintf(stderr, "nxagentResetKeyboard: Can't initialize the keyboard device.\n"); fprintf(stderr, "%s: Can't initialize the keyboard device.\n", __func__);
#endif #endif
nxagentRestoreKeyboardDeviceData(devBackup, dev); nxagentRestoreKeyboardDeviceData(devBackup, dev);
...@@ -1031,7 +1023,6 @@ void nxagentCheckModifierMasks(CARD8 keycode, int j) ...@@ -1031,7 +1023,6 @@ void nxagentCheckModifierMasks(CARD8 keycode, int j)
{ {
nxagentCapsMask |= 1 << j; nxagentCapsMask |= 1 << j;
} }
} }
void nxagentCheckRemoteKeycodes(void) void nxagentCheckRemoteKeycodes(void)
...@@ -1040,9 +1031,8 @@ void nxagentCheckRemoteKeycodes(void) ...@@ -1040,9 +1031,8 @@ void nxagentCheckRemoteKeycodes(void)
nxagentNumLockKeycode = XKeysymToKeycode(nxagentDisplay, XK_Num_Lock); nxagentNumLockKeycode = XKeysymToKeycode(nxagentDisplay, XK_Num_Lock);
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentCheckRemoteKeycodes: Remote keycodes: CapsLock " fprintf(stderr, "%s: Remote keycodes: CapsLock [%d] NumLock [%d].\n", __func__,
"[%d] NumLock [%d].\n", nxagentCapsLockKeycode, nxagentCapsLockKeycode,nxagentNumLockKeycode);
nxagentNumLockKeycode);
#endif #endif
} }
...@@ -1051,7 +1041,7 @@ static int nxagentSaveKeyboardDeviceData(DeviceIntPtr dev, DeviceIntPtr devBacku ...@@ -1051,7 +1041,7 @@ static int nxagentSaveKeyboardDeviceData(DeviceIntPtr dev, DeviceIntPtr devBacku
if (!devBackup) if (!devBackup)
{ {
#ifdef PANIC #ifdef PANIC
fprintf(stderr, "nxagentSaveKeyboardDeviceData: PANIC! Pointer to backup structure is null.\n"); fprintf(stderr, "%s: PANIC! Pointer to backup structure is null.\n", __func__);
#endif #endif
return -1; return -1;
...@@ -1062,7 +1052,7 @@ static int nxagentSaveKeyboardDeviceData(DeviceIntPtr dev, DeviceIntPtr devBacku ...@@ -1062,7 +1052,7 @@ static int nxagentSaveKeyboardDeviceData(DeviceIntPtr dev, DeviceIntPtr devBacku
devBackup -> kbdfeed = dev -> kbdfeed; devBackup -> kbdfeed = dev -> kbdfeed;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentSaveKeyboardDeviceData: Saved device data.\n"); fprintf(stderr, "%s: Saved device data.\n", __func__);
#endif #endif
return 1; return 1;
...@@ -1073,7 +1063,7 @@ static int nxagentRestoreKeyboardDeviceData(DeviceIntPtr devBackup, DeviceIntPtr ...@@ -1073,7 +1063,7 @@ static int nxagentRestoreKeyboardDeviceData(DeviceIntPtr devBackup, DeviceIntPtr
if (!devBackup) if (!devBackup)
{ {
#ifdef PANIC #ifdef PANIC
fprintf(stderr, "nxagentRestoreKeyboardDeviceData: PANIC! Pointer to backup structure is null.\n"); fprintf(stderr, "%s: PANIC! Pointer to backup structure is null.\n", __func__);
#endif #endif
return -1; return -1;
...@@ -1084,7 +1074,7 @@ static int nxagentRestoreKeyboardDeviceData(DeviceIntPtr devBackup, DeviceIntPtr ...@@ -1084,7 +1074,7 @@ static int nxagentRestoreKeyboardDeviceData(DeviceIntPtr devBackup, DeviceIntPtr
dev -> kbdfeed = devBackup -> kbdfeed; dev -> kbdfeed = devBackup -> kbdfeed;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentRestoreKeyboardDeviceData: Restored device data.\n"); fprintf(stderr, "%s: Restored device data.\n", __func__);
#endif #endif
return 1; return 1;
...@@ -1096,7 +1086,7 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) ...@@ -1096,7 +1086,7 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev)
if (!dev) if (!dev)
{ {
#ifdef PANIC #ifdef PANIC
fprintf(stderr, "nxagentFreeKeyboardDeviceData: PANIC! Pointer to device structure is null.\n"); fprintf(stderr, "%s: PANIC! Pointer to device structure is null.\n", __func__);
#endif #endif
return -1; return -1;
...@@ -1138,7 +1128,7 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) ...@@ -1138,7 +1128,7 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev)
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentFreeKeyboardDeviceData: Freed device data.\n"); fprintf(stderr, "%s: Freed device data.\n", __func__);
#endif #endif
return 1; return 1;
...@@ -1148,27 +1138,24 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) ...@@ -1148,27 +1138,24 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev)
int ProcXkbInhibited(register ClientPtr client) int ProcXkbInhibited(register ClientPtr client)
{ {
unsigned char majorop;
unsigned char minorop;
#ifdef TEST #ifdef TEST
fprintf(stderr, "ProcXkbInhibited: Called.\n"); fprintf(stderr, "%s: Called.\n", __func__);
#endif #endif
majorop = ((xReq *)client->requestBuffer)->reqType; unsigned char majorop = ((xReq *)client->requestBuffer)->reqType;
#ifdef PANIC #ifdef PANIC
if (majorop != (unsigned char)nxagentXkbWrapper.base) if (majorop != (unsigned char)nxagentXkbWrapper.base)
{ {
fprintf(stderr, "ProcXkbInhibited: MAJOROP is [%d] but should be [%d].\n", fprintf(stderr, "%s: MAJOROP is [%d] but should be [%d].\n", __func__,
majorop, nxagentXkbWrapper.base); majorop, nxagentXkbWrapper.base);
} }
#endif #endif
minorop = *((unsigned char *) client->requestBuffer + 1); unsigned char minorop = *((unsigned char *) client->requestBuffer + 1);
#ifdef TEST #ifdef TEST
fprintf(stderr, "ProcXkbInhibited: MAJOROP is [%d] MINOROP is [%d].\n", fprintf(stderr, "%s: MAJOROP is [%d] MINOROP is [%d].\n", __func__,
majorop, minorop); majorop, minorop);
#endif #endif
...@@ -1223,13 +1210,13 @@ void nxagentInitXkbWrapper(void) ...@@ -1223,13 +1210,13 @@ void nxagentInitXkbWrapper(void)
ExtensionEntry * extension; ExtensionEntry * extension;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentInitXkbWrapper: Called.\n"); fprintf(stderr, "%s: Called.\n", __func__);
#endif #endif
if (!nxagentOption(InhibitXkb)) if (!nxagentOption(InhibitXkb))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentInitXkbWrapper: Nothing to do.\n"); fprintf(stderr, "%s: Nothing to do.\n", __func__);
#endif #endif
return; return;
...@@ -1246,7 +1233,7 @@ void nxagentInitXkbWrapper(void) ...@@ -1246,7 +1233,7 @@ void nxagentInitXkbWrapper(void)
nxagentXkbWrapper.SProcXkbDispatchBackup = NULL; nxagentXkbWrapper.SProcXkbDispatchBackup = NULL;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentInitXkbWrapper: base [%d] eventBase [%d] errorBase [%d].\n", fprintf(stderr, "%s: base [%d] eventBase [%d] errorBase [%d].\n", __func__,
extension -> base, extension -> eventBase, extension -> errorBase); extension -> base, extension -> eventBase, extension -> errorBase);
#endif #endif
} }
...@@ -1255,7 +1242,7 @@ void nxagentInitXkbWrapper(void) ...@@ -1255,7 +1242,7 @@ void nxagentInitXkbWrapper(void)
nxagentXkbWrapper.base = -1; nxagentXkbWrapper.base = -1;
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentInitXkbWrapper: XKEYBOARD extension not found.\n"); fprintf(stderr, "%s: XKEYBOARD extension not found.\n", __func__);
#endif #endif
} }
} }
...@@ -1263,7 +1250,7 @@ void nxagentInitXkbWrapper(void) ...@@ -1263,7 +1250,7 @@ void nxagentInitXkbWrapper(void)
void nxagentDisableXkbExtension(void) void nxagentDisableXkbExtension(void)
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentDisableXkbExtension: Called.\n"); fprintf(stderr, "%s: Called.\n", __func__);
#endif #endif
if (nxagentXkbWrapper.base > 0) if (nxagentXkbWrapper.base > 0)
...@@ -1277,7 +1264,7 @@ void nxagentDisableXkbExtension(void) ...@@ -1277,7 +1264,7 @@ void nxagentDisableXkbExtension(void)
#ifdef TEST #ifdef TEST
else else
{ {
fprintf(stderr, "nxagentDisableXkbExtension: Nothing to be done for ProcXkbDispatch.\n"); fprintf(stderr, "%s: Nothing to be done for ProcXkbDispatch.\n", __func__);
} }
#endif #endif
...@@ -1290,7 +1277,7 @@ void nxagentDisableXkbExtension(void) ...@@ -1290,7 +1277,7 @@ void nxagentDisableXkbExtension(void)
#ifdef TEST #ifdef TEST
else else
{ {
fprintf(stderr, "nxagentDisableXkbExtension: Nothing to be done for SProcXkbDispatch.\n"); fprintf(stderr, "%s: Nothing to be done for SProcXkbDispatch.\n", __func__);
} }
#endif #endif
} }
...@@ -1299,7 +1286,7 @@ void nxagentDisableXkbExtension(void) ...@@ -1299,7 +1286,7 @@ void nxagentDisableXkbExtension(void)
void nxagentEnableXkbExtension(void) void nxagentEnableXkbExtension(void)
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentEnableXkbExtension: Called.\n"); fprintf(stderr, "%s: Called.\n", __func__);
#endif #endif
if (nxagentXkbWrapper.base > 0) if (nxagentXkbWrapper.base > 0)
...@@ -1313,7 +1300,7 @@ void nxagentEnableXkbExtension(void) ...@@ -1313,7 +1300,7 @@ void nxagentEnableXkbExtension(void)
#ifdef TEST #ifdef TEST
else else
{ {
fprintf(stderr, "nxagentEnableXkbExtension: Nothing to be done for ProcXkbDispatch.\n"); fprintf(stderr, "%s: Nothing to be done for ProcXkbDispatch.\n", __func__);
} }
#endif #endif
...@@ -1326,7 +1313,7 @@ void nxagentEnableXkbExtension(void) ...@@ -1326,7 +1313,7 @@ void nxagentEnableXkbExtension(void)
#ifdef TEST #ifdef TEST
else else
{ {
fprintf(stderr, "nxagentEnableXkbExtension: Nothing to be done for SProcXkbDispatch.\n"); fprintf(stderr, "%s: Nothing to be done for SProcXkbDispatch.\n", __func__);
} }
#endif #endif
} }
...@@ -1347,7 +1334,7 @@ void nxagentTuneXkbWrapper(void) ...@@ -1347,7 +1334,7 @@ void nxagentTuneXkbWrapper(void)
if (!nxagentOption(InhibitXkb)) if (!nxagentOption(InhibitXkb))
{ {
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentTuneXkbWrapper: Nothing to do.\n"); fprintf(stderr, "%s: Nothing to do.\n", __func__);
#endif #endif
return; return;
...@@ -1374,34 +1361,29 @@ void nxagentXkbClearNames(void) ...@@ -1374,34 +1361,29 @@ void nxagentXkbClearNames(void)
static void nxagentXkbGetNames(void) static void nxagentXkbGetNames(void)
{ {
Atom atom;
#ifdef _XSERVER64
Atom64 type;
#else
Atom type;
#endif
int format;
unsigned long n;
unsigned long after;
char *data;
char *name;
Status result;
if (nxagentRemoteRules) if (nxagentRemoteRules)
return; return;
atom = XInternAtom(nxagentDisplay, "_XKB_RULES_NAMES", 1); Atom atom = XInternAtom(nxagentDisplay, "_XKB_RULES_NAMES", 1);
if (atom == 0) if (atom == 0)
{ {
return; return;
} }
data = name = NULL; #ifdef _XSERVER64
Atom64 type;
#else
Atom type;
#endif
int format;
unsigned long n;
unsigned long after;
char *data = NULL;
result = XGetWindowProperty(nxagentDisplay, DefaultRootWindow(nxagentDisplay), Status result = XGetWindowProperty(nxagentDisplay, DefaultRootWindow(nxagentDisplay),
atom, 0, 256, 0, XA_STRING, &type, &format, atom, 0, 256, 0, XA_STRING, &type, &format,
&n, &after, (unsigned char **)&data); &n, &after, (unsigned char **)&data);
if (result != Success || !data) if (result != Success || !data)
{ {
...@@ -1417,7 +1399,7 @@ static void nxagentXkbGetNames(void) ...@@ -1417,7 +1399,7 @@ static void nxagentXkbGetNames(void)
} }
} }
name = data; char *name = data;
if (name < data + n) if (name < data + n)
{ {
...@@ -1589,17 +1571,17 @@ void nxagentKeycodeConversionSetup(void) ...@@ -1589,17 +1571,17 @@ void nxagentKeycodeConversionSetup(void)
Bool nxagentGetRemoteXkbExtension(void) Bool nxagentGetRemoteXkbExtension(void)
{ {
Bool result;
nxagentXkbInfo.Opcode = nxagentXkbInfo.EventBase = nxagentXkbInfo.ErrorBase = nxagentXkbInfo.MajorVersion = nxagentXkbInfo.MinorVersion = -1; nxagentXkbInfo.Opcode = nxagentXkbInfo.EventBase = nxagentXkbInfo.ErrorBase = nxagentXkbInfo.MajorVersion = nxagentXkbInfo.MinorVersion = -1;
nxagentXkbClearNames(); nxagentXkbClearNames();
if ((result = XkbQueryExtension(nxagentDisplay, Bool result = XkbQueryExtension(nxagentDisplay,
&nxagentXkbInfo.Opcode, &nxagentXkbInfo.Opcode,
&nxagentXkbInfo.EventBase, &nxagentXkbInfo.EventBase,
&nxagentXkbInfo.ErrorBase, &nxagentXkbInfo.ErrorBase,
&nxagentXkbInfo.MajorVersion, &nxagentXkbInfo.MajorVersion,
&nxagentXkbInfo.MinorVersion))) &nxagentXkbInfo.MinorVersion);
if (result)
{ {
nxagentXkbGetNames(); nxagentXkbGetNames();
} }
......
...@@ -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)
{ {
...@@ -608,29 +599,34 @@ Bool nxagentReconnectSession(void) ...@@ -608,29 +599,34 @@ Bool nxagentReconnectSession(void)
nxagentOldKeyboard = NULL; nxagentOldKeyboard = NULL;
} }
if (nxagentOption(ResetKeyboardAtResume) == 1 && /* Reset the keyboard only if we detect any changes. */
(nxagentKeyboard == NULL || nxagentOldKeyboard == NULL || if (nxagentOption(ResetKeyboardAtResume) == 1)
strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 ||
strcmp(nxagentKeyboard, "query") == 0 ||
strcmp(nxagentKeyboard, "clone") == 0))
{ {
if (nxagentResetKeyboard() == 0) if (nxagentKeyboard == NULL || nxagentOldKeyboard == NULL ||
strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 ||
strcmp(nxagentKeyboard, "query") == 0 ||
strcmp(nxagentKeyboard, "clone") == 0)
{ {
#ifdef WARNING if (nxagentResetKeyboard() == 0)
if (nxagentVerbose == 1)
{ {
fprintf(stderr, "nxagentReconnectSession: Failed to reset keyboard device.\n"); #ifdef WARNING
} if (nxagentVerbose == 1)
#endif {
fprintf(stderr, "%s: Failed to reset keyboard device.\n", __func__);
}
#endif
failedStep = WINDOW_STEP; failedStep = WINDOW_STEP;
goto nxagentReconnectError; goto nxagentReconnectError;
}
}
else
{
#ifdef DEBUG
fprintf(stderr, "%s: keyboard unchanged - skipping keyboard reset.\n", __func__);
#endif
} }
}
else
{
nxagentKeycodeConversionSetup();
} }
nxagentXkbState.Initialized = 0; nxagentXkbState.Initialized = 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