xserver: Branch 'server-1.6-branch' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Sun Jan 11 16:10:41 PST 2009


 dix/devices.c                  |    1 -
 hw/xfree86/common/xf86Config.c |   12 ++++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 93e510d3abaee97f5b7812abc3a2693dabf94478
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Dec 4 10:30:02 2008 +1000

    xfree86: Only use the evdev ruleset on linux.
    
    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>
    Signed-off-by: Daniel Stone <daniel at fooishbar.org>
    (cherry picked from commit 13de7511b17b57a28668e1a60b196ccfe61dbcbe)
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index ad72b16..6c6fac3 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -855,6 +855,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
@@ -1034,8 +1037,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;
commit cc78f04b22daabc06d9fb82f550e3f4dbbe76f28
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Wed Dec 3 14:24:25 2008 +1000

    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 at redhat.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/dix/devices.c b/dix/devices.c
index 6b05050..bf79024 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -528,7 +528,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);
         }
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index f530ec4..ad72b16 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1032,6 +1032,12 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
     xf86Info.allowEmptyInput = (xf86Info.autoAddDevices && xf86Info.autoEnableDevices);
     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.useDefaultFontPathFrom = X_DEFAULT;
     if (xf86GetOptValBool(FlagOptions, FLAG_USE_DEFAULT_FONT_PATH, &value)) {


More information about the xorg-commit mailing list