From: spitzak <spit...@gmail.com>

This allows X applications to be run on wayland without having to
delete conf files needed to run the legacy X server on the same machine.

This is the only method I have found that will allow the built-in
default conf file to be used while an /etc/X11/xorg.conf.d directory
exists. There is no way to achieve this with switches to the server.

A file is needed to use the wlshm driver, this must now be named
$INSTALL/etc/X11/xwayland.conf. The instructions for running the
x server under wayland need to be fixed for this.
---
 hw/xfree86/common/xf86Config.c |    7 +++++--
 hw/xfree86/common/xf86Init.c   |    4 ++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 3934ff0..a4f7f97 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -2386,8 +2386,11 @@ xf86HandleConfigFile(Bool autoconfig)
             dirfrom = X_CMDLINE;
 
         xf86initConfigFiles();
-        sysdirname = xf86openConfigDirFiles(SYS_CONFIGDIRPATH, NULL,
-                                            PROJECTROOT);
+        if (xf86ConfigDir)
+          sysdirname = 0;
+        else
+          sysdirname = xf86openConfigDirFiles(SYS_CONFIGDIRPATH, NULL,
+                                              PROJECTROOT);
         dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, 
PROJECTROOT);
         filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT);
         if (filename) {
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index a062929..b2a668c 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1412,6 +1412,10 @@ ddxProcessArgument(int argc, char **argv, int i)
   if (!strcmp(argv[i], "-wayland"))
   {
     xorgWayland = TRUE;
+    if (!xf86ConfigFile)
+      xf86ConfigFile = "xwayland.conf";
+    if (!xf86ConfigDir)
+      xf86ConfigDir = "xwayland.conf.d";
     return 1;
   }
 
-- 
1.7.9.5

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to