discomfitor pushed a commit to branch master.

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

commit 62792ce662df3ac8c35a562d8d390d7939ba30a9
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Jul 17 14:55:44 2015 -0400

    ensure wayland parts of shot module use the correct wayland display objects
    
    the ecore-wl global objects used here will be wrong for the case of nested
    compositors
---
 src/modules/shot/e_mod_main.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/modules/shot/e_mod_main.c b/src/modules/shot/e_mod_main.c
index 96ed891..1cba5c7 100644
--- a/src/modules/shot/e_mod_main.c
+++ b/src/modules/shot/e_mod_main.c
@@ -952,7 +952,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 = ecore_wl_shm_get();
+   shm = e_comp->wl_comp_data->wl.shm ?: ecore_wl_shm_get();
 
    EINA_LIST_FOREACH(_outputs, l, output)
      {
@@ -1288,14 +1288,16 @@ e_modapi_init(E_Module *m)
 #ifdef HAVE_WAYLAND
    Eina_Inlist *globals;
    Ecore_Wl_Global *global;
+   struct wl_registry *reg;
 
-   globals = ecore_wl_globals_get();
+   globals = e_comp->wl_comp_data->wl.globals ?: ecore_wl_globals_get();
+   reg = e_comp->wl_comp_data->wl.registry ?: ecore_wl_registry_get();
    EINA_INLIST_FOREACH(globals, global)
      {
         if (!strcmp(global->interface, "screenshooter"))
           {
              _wl_screenshooter =
-               wl_registry_bind(ecore_wl_registry_get(), global->id,
+               wl_registry_bind(reg, global->id,
                                 &screenshooter_interface, global->version);
 
              if (_wl_screenshooter)
@@ -1311,7 +1313,7 @@ e_modapi_init(E_Module *m)
              if (output)
                {
                   output->output =
-                    wl_registry_bind(ecore_wl_registry_get(), global->id,
+                    wl_registry_bind(reg, global->id,
                                      &wl_output_interface, global->version);
                   _outputs = eina_list_append(_outputs, output);
                   wl_output_add_listener(output->output,

-- 


Reply via email to