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

Peter Hutterer peter.hutterer at who-t.net
Thu Dec 4 17:35:34 PST 2008


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;
-- 
1.6.0.4



More information about the xorg mailing list