Let the DDX decide on the XkbRulesDefaults.
Peter Hutterer
peter.hutterer at who-t.net
Tue Dec 16 13:52:06 PST 2008
On Tue, Dec 16, 2008 at 12:05:17PM -0800, Dan Nicholson wrote:
> On Tue, Dec 16, 2008 at 11:50 AM, Keith Packard <keithp at keithp.com> wrote:
> > This patch removes the default rules setting from DIX and adds it to the
> > xfree86 DDX. What happens with other X servers if I apply this patch?
XkbSetRulesDflts only sets some internal defaults but doesn't actually use
them much. XkbInitKeyboardDeviceStruct then calls XkbGetRulesDftls which
returns either the ones set by the DDX, or the defaults. A DDX that doesn't
have set the rules simply defaults to the built-in ones.
> commit c3a5fc4e71b2c50b1981f777263e62ded7e8be0a
> Author: Dan Nicholson <dbn.lists at gmail.com>
> Date: Thu Nov 20 16:13:40 2008 -0800
>
> Set sane XKB defaults at build time instead of overriding from dix
>
> DIX effectively sets the default XKB rules by resetting the defaults when
> setting up the core keyboard. Instead, just set the wanted defaults in
> the XKB macros where they can be altered at build time. The previous XKB
> defaults were bogus, anyway.
> diff --git a/dix/devices.c b/dix/devices.c
> index 583ecc0..e3d6de5 100644
> --- a/dix/devices.c
> +++ b/dix/devices.c
> @@ -526,7 +526,6 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what)
> #ifdef XKB
> if (!noXkbExtension) {
> bzero(&names, sizeof(names));
> - XkbSetRulesDflts("base", "pc105", "us", NULL, NULL);
> XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, modMap,
> CoreKeyboardBell, CoreKeyboardCtl);
> }
Not 100% sure on that (daniel may know more) but that was probably a left-over
from the kbd driver. Anyway, this hunk is in already.
> diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c
> index 3935f40..6d45d74 100644
> --- a/xkb/xkbInit.c
> +++ b/xkb/xkbInit.c
> @@ -87,19 +87,19 @@ typedef struct _SrvXkmInfo {
> /***====================================================================***/
>
> #ifndef XKB_BASE_DIRECTORY
> -#define XKB_BASE_DIRECTORY "/usr/lib/X11/xkb"
> +#define XKB_BASE_DIRECTORY "/usr/share/X11/xkb"
> #endif
> #ifndef XKB_BIN_DIRECTORY
> #define XKB_BIN_DIRECTORY XKB_BASE_DIRECTORY
> #endif
> #ifndef XKB_DFLT_RULES_FILE
> -#define XKB_DFLT_RULES_FILE "rules"
> +#define XKB_DFLT_RULES_FILE "base"
> #endif
> #ifndef XKB_DFLT_KB_LAYOUT
> #define XKB_DFLT_KB_LAYOUT "us"
> #endif
> #ifndef XKB_DFLT_KB_MODEL
> -#define XKB_DFLT_KB_MODEL "dflt"
> +#define XKB_DFLT_KB_MODEL "pc105"
> #endif
> #ifndef XKB_DFLT_KB_VARIANT
> #define XKB_DFLT_KB_VARIANT NULL
this hunk is already in, except the XKB_BASE_DIRECTORY bit. At least Fedora
and Ubuntu now ship in /usr/share, is there anyone left that ships in
/usr/lib? Can you prep a separate patch for this please?
Cheers,
Peter
More information about the xorg
mailing list