snprintf(buf, sizeof(buf), "elm,state,%s,visible", key);
edje_object_signal_emit(target, buf, "elm");
+
+ // If content object is focused,
+ // genlist item should be focused.
+ if (elm_widget_focused_object_get(content))
+ {
+ if (GL_IT(it)->wsd->focused_item != it)
+ elm_object_item_focus_set(it, EINA_TRUE);
+
+ GL_IT(it)->wsd->focused_content = content;
+ }
out:
if (old && content != old)
{
else
elm_object_focus_set(sd->focused_content, EINA_TRUE);
}
- else if (elm_widget_focused_object_get(obj) &&
- (obj != elm_widget_focused_object_get(obj)))
- {
- Item_Block *itb, *nib;
- Eina_List *l, *ll;
- Evas_Object *content = NULL;
- Elm_Gen_Item *it;
- EINA_INLIST_FOREACH(sd->blocks, itb)
- {
- if (itb->realized)
- {
- EINA_LIST_FOREACH(itb->items, l, it)
- {
- EINA_LIST_FOREACH(it->content_objs, ll, content)
- {
- if (elm_widget_focused_object_get(content))
- {
- sd->focused_item = it;
- sd->focused_content = content;
- goto success;
- }
- }
- }
-
- nib = EINA_INLIST_CONTAINER_GET(EINA_INLIST_GET(itb)->next, Item_Block);
- if (!nib || !nib->realized) goto fail;
- }
- }
- }
else
{
Item_Block *itb, *nib;