XKB: ifdef XKB is dead, yet it was still present in a few places.

This commit is contained in:
Maarten Maathuis 2009-01-29 12:42:57 +01:00
parent 756a2c8483
commit 3903e23153
3 changed files with 18 additions and 14 deletions

View File

@ -48,9 +48,7 @@
#include "geext.h" #include "geext.h"
#include "xace.h" #include "xace.h"
#ifdef XKB
#include "xkbsrv.h" #include "xkbsrv.h"
#endif
#include "chdevhier.h" #include "chdevhier.h"
@ -104,6 +102,7 @@ ProcXChangeDeviceHierarchy(ClientPtr client)
{ {
xCreateMasterInfo* c = (xCreateMasterInfo*)any; xCreateMasterInfo* c = (xCreateMasterInfo*)any;
char* name; char* name;
XkbRMLVOSet set;
SWAPIF(swaps(&c->namelen, n)); SWAPIF(swaps(&c->namelen, n));
name = xcalloc(c->namelen + 1, sizeof(char)); name = xcalloc(c->namelen + 1, sizeof(char));
@ -119,11 +118,16 @@ ProcXChangeDeviceHierarchy(ClientPtr client)
if (!c->sendCore) if (!c->sendCore)
ptr->coreEvents = keybd->coreEvents = FALSE; ptr->coreEvents = keybd->coreEvents = FALSE;
#ifdef XKB
/* supplying NULL for rules simply means we re-use /* supplying NULL for rules simply means we re-use
whatever ruleset we used for the previous devices. */ whatever ruleset we used for the previous devices. */
XkbSetRulesDflts(NULL, "pc105", "us", NULL, NULL); set.rules = NULL;
#endif set.model = "pc105";
set.layout = "us";
set.variant = NULL;
set.options = NULL;
XkbSetRulesDflts(&set);
ActivateDevice(ptr); ActivateDevice(ptr);
ActivateDevice(keybd); ActivateDevice(keybd);

View File

@ -801,9 +801,13 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
Bool value; Bool value;
MessageType from; MessageType from;
const char *s; const char *s;
#ifdef XKB XkbRMLVOSet set;
char *rules = "base"; /* Default options. */
#endif set.rules = "base";
set.model = "pc105";
set.layout = "us";
set.variant = NULL;
set.options = NULL;
/* /*
* Merge the ServerLayout and ServerFlags options. The former have * Merge the ServerLayout and ServerFlags options. The former have
@ -957,13 +961,11 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput); xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput);
/* AEI on? Then we're not using kbd, so use the evdev rules set. */ /* AEI on? Then we're not using kbd, so use the evdev rules set. */
#ifdef XKB
#if defined(linux) #if defined(linux)
if (xf86Info.allowEmptyInput) if (xf86Info.allowEmptyInput)
rules = "evdev"; set.rules = "evdev";
#endif
XkbSetRulesDflts(rules, "pc105", "us", NULL, NULL);
#endif #endif
XkbSetRulesDflts(&set);
xf86Info.useDefaultFontPath = TRUE; xf86Info.useDefaultFontPath = TRUE;
xf86Info.useDefaultFontPathFrom = X_DEFAULT; xf86Info.useDefaultFontPathFrom = X_DEFAULT;

View File

@ -92,9 +92,7 @@
#include "dgaproc.h" #include "dgaproc.h"
#endif #endif
#ifdef XKB
#include "xkbsrv.h" #include "xkbsrv.h"
#endif
#include "os.h" #include "os.h"