aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xkb/xkbInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/xkbInit.c')
-rw-r--r--nx-X11/programs/Xserver/xkb/xkbInit.c65
1 files changed, 7 insertions, 58 deletions
diff --git a/nx-X11/programs/Xserver/xkb/xkbInit.c b/nx-X11/programs/Xserver/xkb/xkbInit.c
index 4553cce9e..443265d83 100644
--- a/nx-X11/programs/Xserver/xkb/xkbInit.c
+++ b/nx-X11/programs/Xserver/xkb/xkbInit.c
@@ -118,8 +118,6 @@ char * XkbBinDirectory= XKB_BIN_DIRECTORY;
char * XkbInitialMap= NULL;
int XkbWantAccessX= 0;
static XkbFileInfo * _XkbInitFileInfo= NULL;
-char * XkbDB= NULL;
-int XkbAutoLoad= 1;
static Bool rulesDefined= False;
static char * XkbRulesFile= NULL;
@@ -505,7 +503,7 @@ XkbEventCauseRec cause;
file.file=NULL;
bzero(&file.xkbinfo,sizeof(XkbFileInfo));
bzero(&changes,sizeof(XkbChangesRec));
- if (XkbAutoLoad && (XkbInitialMap!=NULL)) {
+ if (XkbInitialMap!=NULL) {
if ((file.file=XkbDDXOpenConfigFile(XkbInitialMap,NULL,0))!=NULL) {
XkmReadFile(file.file,0,XkmKeymapLegal,&file.xkbinfo);
if (file.xkbinfo.xkb==NULL) {
@@ -638,8 +636,6 @@ KeySymsRec tmpSyms,*pSyms;
CARD8 tmpMods[XkbMaxLegalKeyCode+1],*pMods;
char name[PATH_MAX],*rules;
Bool ok=False;
-XPointer config;
-XkbComponentNamesRec cfgNames;
XkbRF_VarDefsRec defs;
if ((dev->key!=NULL)||(dev->kbdfeed!=NULL))
@@ -647,9 +643,7 @@ XkbRF_VarDefsRec defs;
pSyms= pSymsIn;
pMods= pModsIn;
bzero(&defs,sizeof(XkbRF_VarDefsRec));
- bzero(&cfgNames,sizeof(XkbComponentNamesRec));
rules= XkbGetRulesDflts(&defs);
- config= XkbDDXPreloadConfig(&rules,&defs,&cfgNames,dev);
/*
* The strings are duplicated because it is not guaranteed that
@@ -702,30 +696,6 @@ XkbRF_VarDefsRec defs;
XkbSetRulesUsed(&defs);
}
}
- if (cfgNames.keymap){
- if (names->keymap) _XkbFree(names->keymap);
- names->keymap= cfgNames.keymap;
- }
- if (cfgNames.keycodes){
- if (names->keycodes) _XkbFree(names->keycodes);
- names->keycodes= cfgNames.keycodes;
- }
- if (cfgNames.types) {
- if (names->types) _XkbFree(names->types);
- names->types= cfgNames.types;
- }
- if (cfgNames.compat) {
- if (names->compat) _XkbFree(names->compat);
- names->compat= cfgNames.compat;
- }
- if (cfgNames.symbols){
- if (names->symbols) _XkbFree(names->symbols);
- names->symbols= cfgNames.symbols;
- }
- if (cfgNames.geometry) {
- if (names->geometry) _XkbFree(names->geometry);
- names->geometry= cfgNames.geometry;
- }
if (names->keymap) {
XkbComponentNamesRec tmpNames;
@@ -778,8 +748,6 @@ XkbRF_VarDefsRec defs;
LogMessage(X_WARNING, "Couldn't load XKB keymap, falling back to pre-XKB keymap\n");
}
ok= InitKeyboardDeviceStruct((DevicePtr)dev,pSyms,pMods,bellProc,ctrlProc);
- if ((config!=NULL)&&(dev && dev->key && dev->key->xkbInfo))
- XkbDDXApplyConfig(config,dev->key->xkbInfo);
_XkbInitFileInfo= NULL;
if ((pSyms==&tmpSyms)&&(pSyms->map!=NULL)) {
_XkbFree(pSyms->map);
@@ -960,24 +928,6 @@ XkbProcessArguments(int argc,char *argv[],int i)
return -1;
}
}
- else if (strncmp(argv[i], "-xkbdb", 7) == 0) {
- if(++i < argc) {
- if (strlen(argv[i]) < PATH_MAX) {
- XkbDB= argv[i];
- return 2;
- } else {
- LogMessage(X_ERROR, "-xkbdb pathname too long\n");
- return -1;
- }
- }
- else {
- return -1;
- }
- }
- else if (strncmp(argv[i], "-noloadxkb", 7) == 0) {
- XkbAutoLoad= 0;
- return 1;
- }
else if ((strncmp(argv[i],"-accessx",8)==0)||
(strncmp(argv[i],"+accessx",8)==0)) {
int j=1;
@@ -1016,12 +966,14 @@ XkbProcessArguments(int argc,char *argv[],int i)
}
return j;
}
- if (strcmp (argv[i], "-ar1") == 0) { /* -ar1 int */
+ if ((strcmp(argv[i], "-ardelay") == 0) ||
+ (strcmp (argv[i], "-ar1") == 0)) { /* -ardelay int */
if (++i >= argc) UseMsg ();
XkbDfltRepeatDelay = (long)atoi(argv[i]);
return 2;
}
- if (strcmp (argv[i], "-ar2") == 0) { /* -ar2 int */
+ if ((strcmp(argv[i], "-arinterval") == 0) ||
+ (strcmp (argv[i], "-ar2") == 0)) { /* -arinterval int */
if (++i >= argc) UseMsg ();
XkbDfltRepeatInterval = (long)atoi(argv[i]);
return 2;
@@ -1032,14 +984,11 @@ XkbProcessArguments(int argc,char *argv[],int i)
void
XkbUseMsg(void)
{
- ErrorF("The X Keyboard Extension adds the following arguments:\n");
ErrorF("-kb disable the X Keyboard Extension\n");
ErrorF("+kb enable the X Keyboard Extension\n");
ErrorF("[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]\n");
ErrorF(" enable/disable accessx key sequences\n");
- ErrorF("-ar1 set XKB autorepeat delay\n");
- ErrorF("-ar2 set XKB autorepeat interval\n");
- ErrorF("-noloadxkb don't load XKB keymap description\n");
- ErrorF("-xkbdb file that contains default XKB keymaps\n");
+ ErrorF("-ardelay set XKB autorepeat delay\n");
+ ErrorF("-arinterval set XKB autorepeat interval\n");
ErrorF("-xkbmap XKB keyboard description to load on startup\n");
}