Let the DDX decide on the XkbRulesDefaults.
Rather than assuming rules in the CoreKeyboardProc, init the default rules in InitCoreDevices, then re-use them later. In the xfree86 DDX, set the rules to "base" or "evdev", depending on whether we'll load kbd or evdev. If we create a new MD, use pc105,us as default and re-use the rules file used previously. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
This commit is contained in:
parent
463e02e7de
commit
9c5dd7337f
|
@ -117,7 +117,11 @@ ProcXChangeDeviceHierarchy(ClientPtr client)
|
||||||
|
|
||||||
if (!c->sendCore)
|
if (!c->sendCore)
|
||||||
ptr->coreEvents = keybd->coreEvents = FALSE;
|
ptr->coreEvents = keybd->coreEvents = FALSE;
|
||||||
|
#ifdef XKB
|
||||||
|
/* supplying NULL for rules simply means we re-use
|
||||||
|
whatever ruleset we used for the previous devices. */
|
||||||
|
XkbSetRulesDflts(NULL, "pc105", "us", NULL, NULL);
|
||||||
|
#endif
|
||||||
ActivateDevice(ptr);
|
ActivateDevice(ptr);
|
||||||
ActivateDevice(keybd);
|
ActivateDevice(keybd);
|
||||||
|
|
||||||
|
|
|
@ -526,7 +526,6 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what)
|
||||||
#ifdef XKB
|
#ifdef XKB
|
||||||
if (!noXkbExtension) {
|
if (!noXkbExtension) {
|
||||||
bzero(&names, sizeof(names));
|
bzero(&names, sizeof(names));
|
||||||
XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
|
|
||||||
XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, modMap,
|
XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, modMap,
|
||||||
CoreKeyboardBell, CoreKeyboardCtl);
|
CoreKeyboardBell, CoreKeyboardCtl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1008,6 +1008,12 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
|
||||||
xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
|
xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
|
||||||
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput);
|
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput);
|
||||||
|
|
||||||
|
/* AEI on? Then we're not using kbd, so use the evdev rules set. */
|
||||||
|
#ifdef XKB
|
||||||
|
XkbSetRulesDflts(((xf86Info.allowEmptyInput) ? "evdev" : "base"),
|
||||||
|
"pc105", "us", NULL, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
xf86Info.useDefaultFontPath = TRUE;
|
xf86Info.useDefaultFontPath = TRUE;
|
||||||
xf86Info.useDefaultFontPathFrom = X_DEFAULT;
|
xf86Info.useDefaultFontPathFrom = X_DEFAULT;
|
||||||
if (xf86GetOptValBool(FlagOptions, FLAG_USE_DEFAULT_FONT_PATH, &value)) {
|
if (xf86GetOptValBool(FlagOptions, FLAG_USE_DEFAULT_FONT_PATH, &value)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user