summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/common/xf86Config.c5
-rw-r--r--hw/xfree86/common/xf86Globals.c1
-rw-r--r--hw/xfree86/common/xf86Init.c7
-rw-r--r--hw/xfree86/common/xf86Priv.h1
-rw-r--r--hw/xfree86/parser/Files.c9
-rw-r--r--hw/xfree86/parser/xf86Parser.h1
-rw-r--r--hw/xfree86/parser/xf86tokens.h1
7 files changed, 25 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index fb4142367..17223a123 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -668,6 +668,11 @@ configFiles(XF86ConfFilesPtr fileconf)
xf86Msg(xf86ModPathFrom, "ModulePath set to \"%s\"\n", xf86ModulePath);
+ if (!xf86xkbdirFlag && fileconf && fileconf->file_xkbdir) {
+ XkbBaseDirectory = fileconf->file_xkbdir;
+ xf86Msg(X_CONFIG, "XKB base directory set to \"%s\"\n",
+ XkbBaseDirectory);
+ }
#if 0
/* LogFile */
/*
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 57142beab..04a96cbdc 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -177,6 +177,7 @@ Bool xf86sFlag = FALSE;
Bool xf86bsEnableFlag = FALSE;
Bool xf86bsDisableFlag = FALSE;
Bool xf86silkenMouseDisableFlag = FALSE;
+Bool xf86xkbdirFlag = FALSE;
#ifdef HAVE_ACPI
Bool xf86acpiDisableFlag = FALSE;
#endif
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 236c00ba2..f029915c6 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1844,6 +1844,13 @@ ddxProcessArgument(int argc, char **argv, int i)
FatalError("Invalid isolated device specification\n");
}
}
+ /* Notice cmdline xkbdir, but pass to dix as well */
+ if (!strcmp(argv[i], "-xkbdir"))
+ {
+ xf86xkbdirFlag = TRUE;
+ return 0;
+ }
+
/* OS-specific processing */
return xf86ProcessArgument(argc, argv, i);
}
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 5de48ac77..41ca8f531 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -56,6 +56,7 @@ extern Bool xf86sFlag;
extern Bool xf86bsEnableFlag;
extern Bool xf86bsDisableFlag;
extern Bool xf86silkenMouseDisableFlag;
+extern Bool xf86xkbdirFlag;
extern Bool xf86acpiDisableFlag;
extern char *xf86LayoutName;
extern char *xf86ScreenName;
diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
index 3777432b1..2f77c0e7c 100644
--- a/hw/xfree86/parser/Files.c
+++ b/hw/xfree86/parser/Files.c
@@ -72,6 +72,7 @@ static xf86ConfigSymTabRec FilesTab[] =
{MODULEPATH, "modulepath"},
{INPUTDEVICES, "inputdevices"},
{LOGFILEPATH, "logfile"},
+ {XKBDIR, "xkbdir"},
{-1, ""},
};
@@ -180,6 +181,11 @@ xf86parseFilesSection (void)
Error (QUOTE_MSG, "LogFile");
ptr->file_logfile = val.str;
break;
+ case XKBDIR:
+ if (xf86getSubToken (&(ptr->file_xkbdir)) != STRING)
+ Error (QUOTE_MSG, "XkbDir");
+ ptr->file_xkbdir = val.str;
+ break;
case EOF_TOKEN:
Error (UNEXPECTED_EOF_MSG, NULL);
break;
@@ -255,6 +261,8 @@ xf86printFileSection (FILE * cf, XF86ConfFilesPtr ptr)
}
fprintf (cf, "\tFontPath \"%s\"\n", s);
}
+ if (ptr->file_xkbdir)
+ fprintf (cf, "\tXkbDir \"%s\"\n", ptr->file_xkbdir);
}
void
@@ -268,6 +276,7 @@ xf86freeFiles (XF86ConfFilesPtr p)
TestFree (p->file_inputdevs);
TestFree (p->file_fontpath);
TestFree (p->file_comment);
+ TestFree (p->file_xkbdir);
xf86conffree (p);
}
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index fd6cc530b..1c7b285c8 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -75,6 +75,7 @@ typedef struct
char *file_inputdevs;
char *file_fontpath;
char *file_comment;
+ char *file_xkbdir;
}
XF86ConfFilesRec, *XF86ConfFilesPtr;
diff --git a/hw/xfree86/parser/xf86tokens.h b/hw/xfree86/parser/xf86tokens.h
index 6e4fdeab5..8091f09d3 100644
--- a/hw/xfree86/parser/xf86tokens.h
+++ b/hw/xfree86/parser/xf86tokens.h
@@ -100,6 +100,7 @@ typedef enum {
MODULEPATH,
INPUTDEVICES,
LOGFILEPATH,
+ XKBDIR,
/* Server Flag tokens. These are deprecated in favour of generic Options */
NOTRAPSIGNALS,