[PATCH] xserver: use xwayland.conf instead of xorg.conf

spitzak at gmail.com spitzak at gmail.com
Fri Jun 28 10:07:53 PDT 2013


From: spitzak <spitzak at 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.
In particular this is necessary to test xwayland in the x11 compositor.

Since there is already a --wayland switch I think it is ok for this to
change the conf filename default. The --config switches still work,
whether before or after the --wayland switch.

It was not possible to stop it from looking for xorg.conf.d without
a change to the default behavior. If --configdir is given then it does
not look for xorg.conf.d (previously it would look for it if the
directory given in --configdir did not exist).
---
 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



More information about the wayland-devel mailing list