forked from enlightenment/enlightenment
xwayland: Fix launching of XWayland server and pass proper display to
wl_client_create Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
d79c5657f9
commit
eb4df84aa5
|
@ -164,7 +164,7 @@ static Eina_Bool
|
||||||
_cb_xserver_event(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
|
_cb_xserver_event(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
|
||||||
{
|
{
|
||||||
int socks[2], wms[2], fd;
|
int socks[2], wms[2], fd;
|
||||||
char disp[8], s[8], *xserver = NULL;
|
char disp[8], s[8], xserver[PATH_MAX];
|
||||||
char abs_fd[8], unx_fd[8], wm_fd[8];
|
char abs_fd[8], unx_fd[8], wm_fd[8];
|
||||||
|
|
||||||
if (socketpair(AF_UNIX, (SOCK_STREAM | SOCK_CLOEXEC), 0, socks) < 0)
|
if (socketpair(AF_UNIX, (SOCK_STREAM | SOCK_CLOEXEC), 0, socks) < 0)
|
||||||
|
@ -200,10 +200,11 @@ _cb_xserver_event(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED)
|
||||||
/* ignore usr1 and have X send it to the parent process */
|
/* ignore usr1 and have X send it to the parent process */
|
||||||
signal(SIGUSR1, SIG_IGN);
|
signal(SIGUSR1, SIG_IGN);
|
||||||
|
|
||||||
/* FIXME: need to get the patch of xwayland */
|
/* FIXME: need to get the path of xwayland */
|
||||||
snprintf(disp, sizeof(disp), ":%d", exs->disp);
|
snprintf(disp, sizeof(disp), ":%d", exs->disp);
|
||||||
|
|
||||||
DBG("XWAYLAND: %s", XWAYLAND_BIN);
|
snprintf(xserver, sizeof(xserver), "%s", XWAYLAND_BIN);
|
||||||
|
DBG("\tLaunching XWayland: %s", xserver);
|
||||||
if (execl(xserver, xserver, disp, "-rootless", "-listen", abs_fd,
|
if (execl(xserver, xserver, disp, "-rootless", "-listen", abs_fd,
|
||||||
"-listen", unx_fd, "-wm", wm_fd, "-terminate", NULL) < 0)
|
"-listen", unx_fd, "-wm", wm_fd, "-terminate", NULL) < 0)
|
||||||
{
|
{
|
||||||
|
@ -216,7 +217,7 @@ fail:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
close(socks[1]);
|
close(socks[1]);
|
||||||
exs->client = wl_client_create(exs->disp, socks[0]);
|
exs->client = wl_client_create(exs->wl_disp, socks[0]);
|
||||||
|
|
||||||
close(wms[1]);
|
close(wms[1]);
|
||||||
exs->wm_fd = wms[0];
|
exs->wm_fd = wms[0];
|
||||||
|
@ -237,6 +238,8 @@ _cb_signal_event(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_
|
||||||
/* NB: SIGUSR1 comes from XWayland Server when it has finished
|
/* NB: SIGUSR1 comes from XWayland Server when it has finished
|
||||||
* initialized. */
|
* initialized. */
|
||||||
|
|
||||||
|
DBG("XWayland Finished Init");
|
||||||
|
|
||||||
/* TODO: create "window manager" process */
|
/* TODO: create "window manager" process */
|
||||||
|
|
||||||
/* TODO: NB:
|
/* TODO: NB:
|
||||||
|
@ -256,6 +259,8 @@ e_modapi_init(E_Module *m)
|
||||||
E_Comp *comp;
|
E_Comp *comp;
|
||||||
char disp[8];
|
char disp[8];
|
||||||
|
|
||||||
|
DBG("LOAD XWAYLAND MODULE");
|
||||||
|
|
||||||
/* try to get the running compositor */
|
/* try to get the running compositor */
|
||||||
if (!(comp = e_comp_get(NULL))) return NULL;
|
if (!(comp = e_comp_get(NULL))) return NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue