Options: Accept differently-named options

Take some differently-named options for device and the XKB options.  These
should really be better-handled, but eh.
This commit is contained in:
Daniel Stone
2007-08-01 00:02:33 +03:00
parent e86aab93c5
commit e2be2ffa47
2 changed files with 19 additions and 6 deletions

View File

@@ -398,7 +398,9 @@ EvdevPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
pInfo->private = pEvdev;
pEvdev->device = xf86CheckStrOption(dev->commonOptions, "Device", NULL);
pEvdev->device = xf86CheckStrOption(dev->commonOptions, "path", NULL);
if (!pEvdev->device)
pEvdev->device = xf86CheckStrOption(dev->commonOptions, "Device", NULL);
xf86CollectInputOptions(pInfo, NULL, NULL);
xf86ProcessCommonOptions(pInfo, pInfo->options);

View File

@@ -466,11 +466,22 @@ EvdevKeyNew (InputInfoPtr pInfo)
pInfo->flags |= XI86_KEYBOARD_CAPABLE | XI86_CONFIGURED;
SetXkbOption (pInfo, "XkbRules", __XKBDEFRULES__, &state->key->xkb_rules);
SetXkbOption (pInfo, "XkbModel", "evdev", &state->key->xkb_model);
SetXkbOption (pInfo, "XkbLayout", "us", &state->key->xkb_layout);
SetXkbOption (pInfo, "XkbVariant", NULL, &state->key->xkb_variant);
SetXkbOption (pInfo, "XkbOptions", NULL, &state->key->xkb_options);
SetXkbOption (pInfo, "xkb_rules", NULL, &state->key->xkb_rules);
if (!state->key->xkb_rules)
SetXkbOption (pInfo, "XkbRules", __XKBDEFRULES__,
&state->key->xkb_rules);
SetXkbOption (pInfo, "xkb_model", NULL, &state->key->xkb_model);
if (!state->key->xkb_model)
SetXkbOption (pInfo, "XkbModel", "evdev", &state->key->xkb_model);
SetXkbOption (pInfo, "xkb_layout", NULL, &state->key->xkb_layout);
if (!state->key->xkb_layout)
SetXkbOption (pInfo, "XkbLayout", "us", &state->key->xkb_layout);
SetXkbOption (pInfo, "xkb_variant", NULL, &state->key->xkb_variant);
if (!state->key->xkb_variant)
SetXkbOption (pInfo, "XkbVariant", NULL, &state->key->xkb_variant);
SetXkbOption (pInfo, "xkb_options", NULL, &state->key->xkb_options);
if (!state->key->xkb_options)
SetXkbOption (pInfo, "XkbOptions", NULL, &state->key->xkb_options);
return Success;
}