From 6d3c9d3a1998835b80c07e7807874955db48d3f5 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 11 May 2014 13:06:11 -0400 Subject: [PATCH] feature: add automatic compositor engine detection this takes care of the previously-required E_WL_FORCE autodetection. E_WL_FORCE behavior unchanged --- src/bin/e_comp.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index 93b8b9808..cbfb3b6e8 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -1131,7 +1131,27 @@ e_comp_init(void) } #ifndef HAVE_WAYLAND_ONLY - e_comp_x_init(); + if (!e_comp_x_init()) + { + const char **test, *eng[] = + { +#ifdef HAVE_WL_DRM + "wl_drm", +#endif +/* probably add other engines here; fb should be last? */ +#ifdef HAVE_WL_FM + "wl_fb", +#endif + NULL + }; + + for (test = eng; *test; test++) + { + if (e_module_enable(e_module_new(*test))) + goto out; + } + return EINA_FALSE; + } #endif #if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY) e_comp_wl_init();