hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d989e7eab71e5e9c5b0d7a11210b7df0183abba5

commit d989e7eab71e5e9c5b0d7a11210b7df0183abba5
Author: Marcel Hollerbach <[email protected]>
Date:   Mon Aug 6 16:34:05 2018 +0900

    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
---
 src/lib/elementary/elm_genlist.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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;

-- 


Reply via email to