xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Tue Feb 17 11:01:30 PST 2009


 hw/xfree86/common/xf86Config.c  |    5 +++++
 hw/xfree86/common/xf86Globals.c |    1 +
 hw/xfree86/common/xf86Init.c    |    7 +++++++
 hw/xfree86/common/xf86Priv.h    |    1 +
 hw/xfree86/parser/Files.c       |    9 +++++++++
 hw/xfree86/parser/xf86Parser.h  |    1 +
 hw/xfree86/parser/xf86tokens.h  |    1 +
 7 files changed, 25 insertions(+)

New commits:
commit 76f18b94bd2719a8199334742d021c4d0806187d
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Feb 9 13:09:11 2009 +0100

    Add XkbDir to Files config file section
    
    The XKB base directory was not configuable through the config file.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index a70b1d6..464f276 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 c277369..f414bd3 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 2c4be84..acb775b 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 8457443..76e5b46 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 3777432..2f77c0e 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 0444b03..29825dd 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 6e4fdea..8091f09 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,


More information about the xorg-commit mailing list