From aff78ea8a7f453438d47439708cceb5a8ad11bf0 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 14 Oct 2014 14:12:32 -0400 Subject: [PATCH] add code to create wayland display socket Signed-off-by: Chris Michael --- src/bin/e_comp_wl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 694f2751b..015a447b5 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -29,6 +29,7 @@ static Eina_Bool _e_comp_wl_compositor_create(void) { E_Comp *comp; + const char *name; /* check for existing compositor. create if needed */ if (!(comp = e_comp_get(NULL))) @@ -51,8 +52,20 @@ _e_comp_wl_compositor_create(void) goto disp_err; } + /* try to setup wayland socket */ + if (!(name = wl_display_add_socket_auto(cdata->wl.disp))) + { + ERR("Could not create Wayland display socket: %m"); + goto sock_err; + } + + /* set wayland display environment variable */ + e_env_set("WAYLAND_DISPLAY", name); + return EINA_TRUE; +sock_err: + wl_display_destroy(cdata->wl.disp); disp_err: free(cdata); return EINA_FALSE;