[PATCH] xfree86: Only use the evdev ruleset on linux.

Dan Nicholson dbn.lists at gmail.com
Thu Dec 4 17:45:43 PST 2008


On Thu, Dec 4, 2008 at 5:35 PM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> As suggested by Julien Cristau
>
> This is an follow-up to
> commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a
> Author: Peter Hutterer <peter.hutterer at redhat.com>
> Date:   Wed Dec 3 14:24:25 2008 +1000
>
>    Let the DDX decide on the XkbRulesDefaults.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>
> Acked-by: Julien Cristau <jcristau at debian.org>
> ---
>  hw/xfree86/common/xf86Config.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
> index a03d977..48d8efd 100644
> --- a/hw/xfree86/common/xf86Config.c
> +++ b/hw/xfree86/common/xf86Config.c
> @@ -846,6 +846,9 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
>     Bool value;
>     MessageType from;
>     const char *s;
> +#ifdef XKB
> +    char *rules = "base";
> +#endif
>
>     /*
>      * Merge the ServerLayout and ServerFlags options.  The former have
> @@ -1010,8 +1013,11 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
>
>     /* 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);
> +#if defined(linux)
> +    if (xf86Info.allowEmptyInput)
> +        rules = "evdev";
> +#endif
> +    XkbSetRulesDflts(rules, "pc105", "us", NULL, NULL);
>  #endif
>
>     xf86Info.useDefaultFontPath = TRUE;

Patch seems fine, but I've been curious: is there a reason to specify
the default model and layout? What happens if they're NULL (in
xkbInit.c, too)? Are defaults just picked from xkeyboard-config?

--
Dan



More information about the xorg mailing list