Genlist: Focus does not move, if it is set on item content objects.

Summary:
If focus is set on item content object, it's treated as a
         different object which results the focus deadlock. So, every
         time whenever focus sets on item content object, we need to
         unset and set the focus on genlist object. Thanks to Seoz for
         the idea.

Test Plan: elementary_test -to "genlist focus"

Reviewers: seoz, SanghyeonLee, eagleeye

CC: seoz

Differential Revision: https://phab.enlightenment.org/D891
This commit is contained in:
chinmaya 2014-05-26 15:45:54 +09:00 committed by Carsten Haitzler (Rasterman)
parent c3c0c7abc3
commit cd603fa02b
1 changed files with 15 additions and 0 deletions

View File

@ -5507,6 +5507,21 @@ _item_select(Elm_Gen_Item *it)
else
sd->last_selected_item = (Elm_Object_Item *)it;
}
if (!(sd->focus_on_selection_enabled || _elm_config->item_select_on_focus_disable))
{
Evas_Object *swallow_obj;
Eina_List *l;
EINA_LIST_FOREACH(it->content_objs, l, swallow_obj)
{
if (elm_object_focus_get(swallow_obj))
{
elm_object_focus_set( obj, EINA_FALSE);
elm_object_focus_set( obj, EINA_TRUE);
break;
}
}
}
evas_object_unref(obj);
}