forked from enlightenment/enlightenment
Port shot module to use ecore_wl2 library
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
43140e080d
commit
9e8d0cc426
|
@ -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);
|
sh = E_CLAMP(sh, 1, ec->zone->y + ec->zone->h - y);
|
||||||
}
|
}
|
||||||
|
|
||||||
shm = e_comp_wl->wl.shm ?: ecore_wl_shm_get();
|
shm = e_comp_wl->wl.shm ?: ecore_wl2_display_shm_get(ewd);
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_outputs, l, output)
|
EINA_LIST_FOREACH(_outputs, l, output)
|
||||||
{
|
{
|
||||||
|
@ -1258,31 +1258,19 @@ static Ecore_Event_Handler *wl_global_handler;
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_wl_init()
|
_wl_init()
|
||||||
{
|
{
|
||||||
Eina_Inlist *globals;
|
Eina_Iterator *itr;
|
||||||
Ecore_Wl_Global *global;
|
Ecore_Wl2_Global *global;
|
||||||
struct wl_registry *reg;
|
struct wl_registry *reg;
|
||||||
|
void *data;
|
||||||
|
|
||||||
reg = e_comp_wl->wl.registry ?: ecore_wl_registry_get();
|
reg = e_comp_wl->wl.registry ?: ecore_wl2_display_registry_get(ewd);
|
||||||
if (e_comp_wl->wl.registry)
|
itr = ecore_wl2_display_globals_get(ewd);
|
||||||
globals = e_comp_wl->wl.globals;
|
EINA_ITERATOR_FOREACH(itr, data)
|
||||||
else
|
|
||||||
globals = ecore_wl_globals_get();
|
|
||||||
if (!globals)
|
|
||||||
{
|
{
|
||||||
if (!wl_global_handler)
|
global = (Ecore_Wl2_Global *)data;
|
||||||
{
|
|
||||||
if (e_comp_wl->wl.registry)
|
if ((!_wl_screenshooter) &&
|
||||||
wl_global_handler = ecore_event_handler_add(E_EVENT_WAYLAND_GLOBAL_ADD,
|
(!strcmp(global->interface, "screenshooter")))
|
||||||
(Ecore_Event_Handler_Cb)_wl_init, NULL);
|
|
||||||
else
|
|
||||||
wl_global_handler = ecore_event_handler_add(ECORE_WL_EVENT_INTERFACES_BOUND,
|
|
||||||
(Ecore_Event_Handler_Cb)_wl_init, NULL);
|
|
||||||
}
|
|
||||||
return ECORE_CALLBACK_RENEW;
|
|
||||||
}
|
|
||||||
EINA_INLIST_FOREACH(globals, global)
|
|
||||||
{
|
|
||||||
if ((!_wl_screenshooter) && (!strcmp(global->interface, "screenshooter")))
|
|
||||||
{
|
{
|
||||||
_wl_screenshooter =
|
_wl_screenshooter =
|
||||||
wl_registry_bind(reg, global->id,
|
wl_registry_bind(reg, global->id,
|
||||||
|
@ -1312,6 +1300,7 @@ _wl_init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue