discomfitor pushed a commit to branch master.

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

commit 972b00316382bbaca9bba929d172a766f60858f9
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Jun 25 18:41:07 2015 -0400

    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 4dcc08a..c20aa24 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 2013607..2eed1a2 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;
 }

-- 


Reply via email to