[PATCH xwayland 1/3] configure: fallback to wlshm in case of xwayland

Tiago Vignatti tiago.vignatti at intel.com
Mon May 7 05:04:57 PDT 2012


If it doesn't find the proper driver for a chipset then it fallback to the shm
solution.

But say we have intel and wlshm drivers then it will load both, short-circuit
somewhere and fail to bring xwayland properly. Therefore, I believe this is
not the ideal solution either.

Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
hmm, I'm not particularly happy with this patch really. But I'm sending
anyway for two reasons: first, tells that I'm happy with wlshm driver. It
works, cool! And second, I'd like to check if someone has a wiser solution for
the problem of having more than one xwayland driver in the same system.

 hw/xfree86/common/xf86AutoConfig.c |    6 ++++++
 include/xorg-config.h.in           |    3 +++
 2 files changed, 9 insertions(+)

diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c
index 0c46568..2aec527 100644
--- a/hw/xfree86/common/xf86AutoConfig.c
+++ b/hw/xfree86/common/xf86AutoConfig.c
@@ -277,6 +277,12 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
 #endif
     }
 #endif /* !sun */
+
+#if defined(XORG_WAYLAND)
+    if (i < (nmatches - 1) && xorgWayland) {
+	matches[i++] = xnfstrdup("wlshm");
+    }
+#endif
 }
 
 /* copy a screen section and enter the desired driver
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index 2cc416a..53a6534 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -136,4 +136,7 @@
 /* Have getresuid */
 #undef HAVE_GETRESUID
 
+/* Have X Wayland support */
+#undef XORG_WAYLAND
+
 #endif /* _XORG_CONFIG_H_ */
-- 
1.7.9.5



More information about the wayland-devel mailing list