From 13de7511b17b57a28668e1a60b196ccfe61dbcbe Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 4 Dec 2008 10:30:02 +1000 Subject: [PATCH] xfree86: Only use the evdev ruleset on linux. As suggested by Julien Cristau This is an follow-up to commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a Author: Peter Hutterer Date: Wed Dec 3 14:24:25 2008 +1000 Let the DDX decide on the XkbRulesDefaults. Signed-off-by: Peter Hutterer Acked-by: Julien Cristau Signed-off-by: Daniel Stone --- hw/xfree86/common/xf86Config.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index a03d977c0..48d8efdb2 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;