diff options
author | Keith Packard <keithp@keithp.com> | 2009-02-09 13:09:11 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-02-17 11:01:15 -0800 |
commit | 76f18b94bd2719a8199334742d021c4d0806187d (patch) | |
tree | f616051b2de4f5e6a701275c5ab5c766d902620e | |
parent | 123093996507c4d3b6dc457240ce00f8ac42f410 (diff) |
Add XkbDir to Files config file section
The XKB base directory was not configuable through the config file.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | hw/xfree86/common/xf86Config.c | 5 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Globals.c | 1 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 7 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Priv.h | 1 | ||||
-rw-r--r-- | hw/xfree86/parser/Files.c | 9 | ||||
-rw-r--r-- | hw/xfree86/parser/xf86Parser.h | 1 | ||||
-rw-r--r-- | hw/xfree86/parser/xf86tokens.h | 1 |
7 files changed, 25 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index a70b1d6d7..464f276c4 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -664,6 +664,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 c27736937..f414bd371 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -176,6 +176,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 2c4be84c6..acb775bbe 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1828,6 +1828,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 845744338..76e5b4640 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -56,6 +56,7 @@ extern _X_EXPORT Bool xf86sFlag; extern _X_EXPORT Bool xf86bsEnableFlag; extern _X_EXPORT Bool xf86bsDisableFlag; extern _X_EXPORT Bool xf86silkenMouseDisableFlag; +extern _X_EXPORT Bool xf86xkbdirFlag; #ifdef HAVE_ACPI extern _X_EXPORT Bool xf86acpiDisableFlag; #endif 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 0444b0338..29825dd51 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, |