devilhorns pushed a commit to branch master.

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

commit f005ac9bff91870fe6ce6f3b6d2e1011f3eabee5
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Sat Dec 5 13:09:03 2015 -0500

    create wl client connection during compositor init, use in shot module
    
    fixes shot module
    
    ref T2919
---
 src/bin/e_comp_wl.c           | 1 +
 src/bin/e_comp_wl.h           | 1 +
 src/modules/shot/e_mod_main.c | 6 +++---
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 16041c1..b44918c 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2584,6 +2584,7 @@ _e_comp_wl_compositor_create(void)
         e_comp_wl_input_keymap_set(rules, model, layout);
      }
 #endif
+   e_comp_wl->wl.client_disp = ecore_wl2_display_connect(NULL);
 
    /* setup module idler to load shell mmodule */
    ecore_idler_add(_e_comp_wl_cb_module_idle, cdata);
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index a061c5a..e60ae9e 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -101,6 +101,7 @@ struct _E_Comp_Wl_Data
    struct
      {
         struct wl_display *disp;
+        Ecore_Wl2_Display *client_disp;
         struct wl_registry *registry; // only used for nested wl compositors
         /* struct wl_event_loop *loop; */
         Eina_Inlist *globals;  // only used for nested wl compositors
diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index 85d61f7..0174bbb 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -953,7 +953,7 @@ _wl_shot_now(E_Zone *zone, E_Client *ec, const char *params)
         sh = E_CLAMP(sh, 1, ec->zone->y + ec->zone->h - y);
      }
 
-   shm = e_comp_wl->wl.shm ?: ecore_wl2_display_shm_get(ewd);
+   shm = e_comp_wl->wl.shm ?: 
ecore_wl2_display_shm_get(e_comp_wl->wl.client_disp);
 
    EINA_LIST_FOREACH(_outputs, l, output)
      {
@@ -1263,8 +1263,8 @@ _wl_init()
    struct wl_registry *reg;
    void *data;
 
-   reg = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd);
-   itr = ecore_wl2_display_globals_get(ewd);
+   reg = e_comp_wl->wl.registry ?: 
ecore_wl2_display_registry_get(e_comp_wl->wl.client_disp);
+   itr = ecore_wl2_display_globals_get(e_comp_wl->wl.client_disp);
    EINA_ITERATOR_FOREACH(itr, data)
      {
         global = (Ecore_Wl2_Global *)data;

-- 


Reply via email to