From 972b00316382bbaca9bba929d172a766f60858f9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 25 Jun 2015 18:41:07 -0400 Subject: [PATCH] finish xwayland module implementation note that this basically does nothing other than start an xserver and connection bisect harder if looking for bugs --- src/bin/e_comp_wl.h | 2 ++ src/modules/xwayland/e_mod_main.c | 16 ++++++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h index 4dcc08a63..c20aa24f5 100644 --- a/src/bin/e_comp_wl.h +++ b/src/bin/e_comp_wl.h @@ -210,6 +210,8 @@ struct _E_Comp_Wl_Data Ecore_Fd_Handler *fd_hdlr; Ecore_Idler *idler; + struct wl_client *xwl_client; + /* Eina_List *retry_clients; */ /* Ecore_Timer *retry_timer; */ Eina_Bool restack : 1; diff --git a/src/modules/xwayland/e_mod_main.c b/src/modules/xwayland/e_mod_main.c index 201360778..2eed1a266 100644 --- a/src/modules/xwayland/e_mod_main.c +++ b/src/modules/xwayland/e_mod_main.c @@ -13,7 +13,6 @@ struct _E_XWayland_Server struct wl_display *wl_disp; struct wl_event_loop *loop; - struct wl_client *client; Ecore_Fd_Handler *abs_hdlr, *unx_hdlr; Ecore_Event_Handler *sig_hdlr; @@ -217,7 +216,7 @@ _cb_xserver_event(void *data EINA_UNUSED, Ecore_Fd_Handler *hdlr EINA_UNUSED) snprintf(xserver, sizeof(xserver), "%s", XWAYLAND_BIN); DBG("\tLaunching XWayland: %s: %s", xserver, disp); if (execl(xserver, xserver, disp, "-rootless", "-listen", abs_fd, - "-listen", unx_fd, "-wm", wm_fd, "-terminate", "-shm", + "-listen", unx_fd, "-terminate", "-shm", NULL) < 0) { ERR("Failed to exec XWayland: %m"); @@ -228,7 +227,7 @@ fail: default: close(socks[1]); - exs->client = wl_client_create(exs->wl_disp, socks[0]); + e_comp->wl_comp_data->xwl_client = wl_client_create(exs->wl_disp, socks[0]); close(wms[1]); exs->wm_fd = wms[0]; @@ -252,6 +251,7 @@ static Eina_Bool _cb_signal_event(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) { Ecore_Event_Signal_User *ev; + char buf[128]; ev = event; if (ev->number != 1) return ECORE_CALLBACK_RENEW; @@ -260,13 +260,9 @@ _cb_signal_event(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) * initialized. */ DBG("XWayland Finished Init"); - - /* TODO: create "window manager" process */ - - /* TODO: NB: - * - * Weston creates a smaller window manager process here. - * We Maybe able to just do e_comp_x_init, but will have to test that */ + snprintf(buf, sizeof(buf), ":%d", exs->disp); + assert(ecore_x_init(buf)); + e_comp_x_init(); return ECORE_CALLBACK_CANCEL; }