[PATCH] X server uses xwayland.conf instead of xorg.conf

Kristian Høgsberg hoegsberg at gmail.com
Wed May 1 10:33:27 PDT 2013


On Sun, Apr 21, 2013 at 10:24:58PM -0700, spitzak at gmail.com wrote:
> 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.
> 
> 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.

This isn't the right way to make X load the wlshm driver.  The native
drivers all should fail to load if they don't support xwayland.  If
that happens we need to change the fallback in the automatic driver
picking to pick wlshm instead of fbdev or vesa or whatever it's
picking now.

Kristian

> ---
>  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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list