Commit d5c9733b authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

nxagent: simplify keycode conversion setup

parent 1d6c241d
......@@ -1691,10 +1691,14 @@ void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, char *vari
void nxagentKeycodeConversionSetup(void)
{
nxagentKeycodeConversion = False;
if (nxagentXkbInfo.Opcode == -1)
return;
if (nxagentOption(KeycodeConversion) == KeycodeConversionOff)
{
fprintf(stderr, "Info: Keycode conversion is off\n");
nxagentKeycodeConversion = False;
}
else if (nxagentOption(KeycodeConversion) == KeycodeConversionOn)
{
......@@ -1721,20 +1725,7 @@ void nxagentKeycodeConversionSetup(void)
#endif
fprintf(stderr, "Info: Keycode conversion auto-determined as off\n");
nxagentKeycodeConversion = False;
}
}
}
void nxagentResetKeycodeConversion(void)
{
if (nxagentXkbInfo.Opcode != -1)
{
nxagentKeycodeConversionSetup();
}
else
{
nxagentKeycodeConversion = False;
}
}
......
......@@ -117,7 +117,7 @@ void nxagentEnableXkbExtension(void);
void nxagentTuneXkbWrapper(void);
void nxagentResetKeycodeConversion(void);
void nxagentKeycodeConversionSetup(void);
Bool nxagentGetRemoteXkbExtension(void);
#endif
......
......@@ -620,7 +620,7 @@ Bool nxagentReconnectSession(void)
}
else
{
nxagentResetKeycodeConversion();
nxagentKeycodeConversionSetup();
}
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