add code to create wayland display socket
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
6c76d16a33
commit
aff78ea8a7
|
@ -29,6 +29,7 @@ static Eina_Bool
|
||||||
_e_comp_wl_compositor_create(void)
|
_e_comp_wl_compositor_create(void)
|
||||||
{
|
{
|
||||||
E_Comp *comp;
|
E_Comp *comp;
|
||||||
|
const char *name;
|
||||||
|
|
||||||
/* check for existing compositor. create if needed */
|
/* check for existing compositor. create if needed */
|
||||||
if (!(comp = e_comp_get(NULL)))
|
if (!(comp = e_comp_get(NULL)))
|
||||||
|
@ -51,8 +52,20 @@ _e_comp_wl_compositor_create(void)
|
||||||
goto disp_err;
|
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;
|
return EINA_TRUE;
|
||||||
|
|
||||||
|
sock_err:
|
||||||
|
wl_display_destroy(cdata->wl.disp);
|
||||||
disp_err:
|
disp_err:
|
||||||
free(cdata);
|
free(cdata);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
Loading…
Reference in New Issue