EINA_LIST_FOREACH(actg->acts, l, actd)
{
- if (!strcmp(actd->act_name, act_name))
+ if ((actd->act_name) && (!strcmp(actd->act_name, act_name)))
{
actg->acts = eina_list_remove(actg->acts, actd);
E_API int E_EVENT_CLIENT_BUFFER_CHANGE = -1;
#endif
-static Eina_Hash *clients_hash[2] = {NULL}; // pixmap->client
+static Eina_Hash *clients_hash[E_PIXMAP_TYPE_MAX] = {NULL}; // pixmap->client
static unsigned int focus_track_frozen = 0;
_e_client_del(E_Client *ec)
{
E_Client *child;
+ E_Pixmap_Type type;
ec->changed = 0;
focus_stack = eina_list_remove(focus_stack, ec);
EINA_LIST_FREE(ec->group, child)
child->leader = NULL;
- eina_hash_del_by_key(clients_hash[e_pixmap_type_get(ec->pixmap)], &ec->pixmap);
+ type = e_pixmap_type_get(ec->pixmap);
+ if (type < E_PIXMAP_TYPE_MAX)
+ eina_hash_del_by_key(clients_hash[type], &ec->pixmap);
e_comp->clients = eina_list_remove(e_comp->clients, ec);
e_comp_object_render_update_del(ec->frame);
e_comp_post_update_purge(ec);
{
const Eina_List *l;
E_Client *ec;
+ Eina_Bool exist_clients_hash = EINA_FALSE;
+ int pix_id;
- if ((!eina_hash_population(clients_hash[0])) && (!eina_hash_population(clients_hash[1]))) return;
+ for (pix_id = 0; pix_id < E_PIXMAP_TYPE_MAX; pix_id++)
+ {
+ if (eina_hash_population(clients_hash[pix_id]))
+ {
+ exist_clients_hash = EINA_TRUE;
+ break;
+ }
+ }
+ if (!exist_clients_hash) return;
TRACE_DS_BEGIN(CLIENT:IDLE BEFORE);
EINTERN Eina_Bool
e_client_init(void)
{
- clients_hash[0] = eina_hash_pointer_new(NULL);
- clients_hash[1] = eina_hash_pointer_new(NULL);
+ int pix_id;
+ for (pix_id = 0; pix_id < E_PIXMAP_TYPE_MAX; pix_id++)
+ clients_hash[pix_id] = eina_hash_pointer_new(NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_POINTER_WARP, _e_client_cb_pointer_warp, NULL);
E_LIST_HANDLER_APPEND(handlers, E_EVENT_CONFIG_MODE_CHANGED, _e_client_cb_config_mode, NULL);
EINTERN void
e_client_shutdown(void)
{
- E_FREE_FUNC(clients_hash[0], eina_hash_free);
- E_FREE_FUNC(clients_hash[1], eina_hash_free);
+ int pix_id;
+ for (pix_id = 0; pix_id < E_PIXMAP_TYPE_MAX; pix_id++)
+ E_FREE_FUNC(clients_hash[pix_id], eina_hash_free);
E_FREE_LIST(handlers, ecore_event_handler_del);
e_client_new(E_Pixmap *cp, int first_map, int internal)
{
E_Client *ec;
+ E_Pixmap_Type type;
- if (eina_hash_find(clients_hash[e_pixmap_type_get(cp)], &cp)) return NULL;
+ type = e_pixmap_type_get(cp);
+ if (type >= E_PIXMAP_TYPE_MAX) return NULL;
+ if (eina_hash_find(clients_hash[type], &cp)) return NULL;
ec = E_OBJECT_ALLOC(E_Client, E_CLIENT_TYPE, _e_client_free);
if (!ec) return NULL;
Eina_Stringshare *name;
struct {
- Ecore_Window win;
Evas_Object *obj;
- //Eina_Inlist *objs; /* E_Comp_Object; NOT to be exposed; seems pointless? */
Eina_Inlist *clients; /* E_Client, bottom to top */
unsigned int clients_count;
} layers[E_LAYER_COUNT];
hwc_layer->info.dst_pos.w, hwc_layer->info.dst_pos.h, data);
else
ELOGF("HWC", "Commit Layer(%p) wl_buffer(%p) tsurface(%p) (%dx%d,[%d,%d,%d,%d]=>[%d,%d,%d,%d]) data(%p) wl_buffer_ref(%p)",
- ec->pixmap, ec, hwc_layer, _get_wl_buffer(ec), tsurface,
+ ec ? ec->pixmap : NULL, ec,
+ hwc_layer, _get_wl_buffer(ec), tsurface,
hwc_layer->info.src_config.size.h, hwc_layer->info.src_config.size.h,
hwc_layer->info.src_config.pos.x, hwc_layer->info.src_config.pos.y,
hwc_layer->info.src_config.pos.w, hwc_layer->info.src_config.pos.h,
EINA_LIST_FREE(state->damages, dmg)
{
Eina_Rectangle temp = {0,};
- if (ec->comp_data && ec->comp_data->sub.data &&
+ if (ec->comp_data->sub.data &&
(ec->comp_data->scaler.buffer_viewport.surface.width != -1 ||
ec->comp_data->scaler.buffer_viewport.buffer.src_width != wl_fixed_from_int(-1)))
{
e_comp_wl->wl.glapi = glapi;
e_comp_wl->wl.glsfc = sfc;
e_comp_wl->wl.glctx = ctx;
- e_comp_wl->wl.glcfg = cfg;
/* for native surface */
e_comp->gl = 1;
if (!found)
{
hint = E_NEW(E_Comp_Wl_Aux_Hint, 1);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(hint, EINA_FALSE);
+
memset(hint, 0, sizeof(E_Comp_Wl_Aux_Hint));
- if (hint)
- {
- hint->id = id;
- hint->hint = eina_stringshare_add(name);
- hint->val = eina_stringshare_add(val);
- hint->changed = EINA_TRUE;
- hint->deleted = EINA_FALSE;
- cdata->aux_hint.hints = eina_list_append(cdata->aux_hint.hints, hint);
- cdata->aux_hint.changed = 1;
- ELOGF("COMP", "AUX_HINT |Add [%d:%s:%s]", cp, e_pixmap_client_get(cp),
- id, hint->hint, hint->val);
- }
+
+ hint->id = id;
+ hint->hint = eina_stringshare_add(name);
+ hint->val = eina_stringshare_add(val);
+ hint->changed = EINA_TRUE;
+ hint->deleted = EINA_FALSE;
+ cdata->aux_hint.hints = eina_list_append(cdata->aux_hint.hints, hint);
+ cdata->aux_hint.changed = 1;
+ ELOGF("COMP", "AUX_HINT |Add [%d:%s:%s]", cp, e_pixmap_client_get(cp),
+ id, hint->hint, hint->val);
}
if (!found)