diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2018-08-06 16:34:05 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2018-08-06 16:34:05 +0900 |
commit | d989e7eab71e5e9c5b0d7a11210b7df0183abba5 (patch) | |
tree | b74b7fa4a3390737d4736ec91051dff2e3dcd4ec | |
parent | e8d40a04b98cc9d86beb4d4501248a0e4014ca33 (diff) | |
download | efl-d989e7eab71e5e9c5b0d7a11210b7df0183abba5.tar.gz |
elm_genlist: fix ghost objects from the genlist cache
Summary:
the cache simply moved the objects to -9999 -9999 while leaving them
visible and focusable. Hiding them does not work since edje makes it
visible all the time again. Making them unfocusable fixes this.
Depends on D6752
Subscribers: cedric, #committers, zmike
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D6753
-rw-r--r-- | src/lib/elementary/elm_genlist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 854d3e569c..fe1ba66d51 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -1664,6 +1664,8 @@ _item_cache_find(Elm_Gen_Item *it) if (it->item->type & ELM_GENLIST_ITEM_TREE) tree = 1; EINA_INLIST_FOREACH_SAFE(sd->item_cache, l, itc) { + Evas_Object *obj; + if ((itc->tree == tree) && (((!it->itc) && (!itc->item_class)) || (it->itc && itc->item_class && @@ -1677,7 +1679,8 @@ _item_cache_find(Elm_Gen_Item *it) itc->spacer = NULL; efl_wref_del(itc->base_view, &itc->base_view); itc->base_view = NULL; - eina_list_free(itc->contents); + EINA_LIST_FREE(itc->contents, obj) + elm_widget_tree_unfocusable_set(obj, EINA_FALSE); itc->contents = NULL; _item_cache_free(itc); return EINA_TRUE; @@ -1695,6 +1698,7 @@ _content_cache_add(Elm_Gen_Item *it, Eina_List **cache) { *cache = eina_list_append(*cache, content); eina_hash_del_by_key(pd->content_item_map, &content); + elm_widget_tree_unfocusable_set(content, EINA_TRUE); } return *cache; |