From 62792ce662df3ac8c35a562d8d390d7939ba30a9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 17 Jul 2015 14:55:44 -0400 Subject: [PATCH] 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, -- 2.7.4