finish xwayland module implementation
authorMike Blumenkrantz <zmike@osg.samsung.com>
Thu, 25 Jun 2015 22:41:07 +0000 (18:41 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Fri, 26 Jun 2015 00:04:31 +0000 (20:04 -0400)
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
src/modules/xwayland/e_mod_main.c

index 4dcc08a..c20aa24 100644 (file)
@@ -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;
index 2013607..2eed1a2 100644 (file)
@@ -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;
 }