devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=aff78ea8a7f453438d47439708cceb5a8ad11bf0

commit aff78ea8a7f453438d47439708cceb5a8ad11bf0
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Tue Oct 14 14:12:32 2014 -0400

    add code to create wayland display socket
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 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 694f275..015a447 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;

-- 


Reply via email to