xkb: delete default rules when devices are closed.
We only have one set of default rules options in xkb. When the second keyboard is brought up with Xkb options specified, these new options overwrite the old. In future server generations, the rules used for the VCK are a mixture of the default ones and ones previously specified for other keyboards. Simply resetting the xkb default rules to NULL avoids this issue. Reproducable by setting XkbLayout "de" and XkbVariant "nodeadkeys". In the second server generation, the VCK has "us(nodeadkeys)". This again produces a SIGABRT when the first key is hit. I could not figure out why the SIGABRT happens. This patch is avoiding the issue rather than fixing it.
This commit is contained in:
parent
5ebe76f13f
commit
5a3d06b8f4
|
@ -847,6 +847,9 @@ CloseDownDevices(void)
|
|||
inputInfo.off_devices = NULL;
|
||||
inputInfo.keyboard = NULL;
|
||||
inputInfo.pointer = NULL;
|
||||
#ifdef XKB
|
||||
XkbDeleteRulesDflts();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -899,6 +899,10 @@ extern void XkbSetRulesDflts(
|
|||
char * /* options */
|
||||
);
|
||||
|
||||
extern void XkbDeleteRulesDflts(
|
||||
void
|
||||
);
|
||||
|
||||
extern void XkbInitDevice(
|
||||
DeviceIntPtr /* pXDev */
|
||||
);
|
||||
|
|
|
@ -279,6 +279,21 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout,
|
|||
return;
|
||||
}
|
||||
|
||||
void
|
||||
XkbDeleteRulesDflts()
|
||||
{
|
||||
_XkbFree(XkbRulesFile);
|
||||
XkbRulesFile = NULL;
|
||||
_XkbFree(XkbModelDflt);
|
||||
XkbModelDflt = NULL;
|
||||
_XkbFree(XkbLayoutDflt);
|
||||
XkbLayoutDflt = NULL;
|
||||
_XkbFree(XkbVariantDflt);
|
||||
XkbVariantDflt = NULL;
|
||||
_XkbFree(XkbOptionsDflt);
|
||||
XkbOptionsDflt = NULL;
|
||||
}
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
#include "xkbDflts.h"
|
||||
|
|
Loading…
Reference in New Issue
Block a user