discomfitor pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=83475dad7e10120192af80702ee7b7017920812d
commit 83475dad7e10120192af80702ee7b7017920812d Author: Mike Blumenkrantz <zm...@samsung.com> Date: Thu Mar 20 14:06:19 2014 -0400 set wayland display socket based on e_ipc_socket name --- src/bin/e_comp_wl.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 63344fa..7a4a7d2 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -236,13 +236,17 @@ EAPI Eina_Bool e_comp_wl_init(void) { int fd = 0; + char buf[PATH_MAX]; /* try to allocate space for a new compositor */ if (!(_e_wl_comp = E_NEW(E_Wayland_Compositor, 1))) return EINA_FALSE; /* try to create a wayland display */ - if (!(_e_wl_comp->wl.display = wl_display_create())) + snprintf(buf, sizeof(buf), "%s/wayland-0", e_ipc_socket); + e_env_set("WAYLAND_DISPLAY", buf); + if ((!(_e_wl_comp->wl.display = wl_display_create())) || + wl_display_add_socket(_e_wl_comp->wl.display, buf)) { ERR("Could not create a Wayland Display: %m"); goto err; @@ -354,13 +358,6 @@ e_comp_wl_init(void) /* TODO: event handlers ?? */ - /* try to add a display socket */ - if (wl_display_add_socket(_e_wl_comp->wl.display, NULL) < 0) - { - ERR("Could not add a Wayland Display socket: %m"); - goto err; - } - wl_event_loop_dispatch(_e_wl_comp->wl.loop, 0); /* add an idler for deferred shell module loading */ @@ -370,6 +367,7 @@ e_comp_wl_init(void) return EINA_TRUE; err: + e_env_set("WAYLAND_DISPLAY", ""); /* remove kbd handler */ if (_e_wl_comp->kbd_handler) ecore_event_handler_del(_e_wl_comp->kbd_handler); --