{
Elm_Gen_Item *tmp;
Eina_Bool find;
+ if (!elm_widget_focus_get(WIDGET(it))) goto failed;
+
tmp = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
find = _item_focusable_search(&tmp, 1);
- if (find) elm_object_item_focus_set(tmp, EINA_TRUE);
+ if (find)
+ {
+ elm_object_item_focus_set(EO_OBJ(tmp), EINA_TRUE);
+ goto end;
+ }
else
{
tmp = ELM_GEN_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
find = _item_focusable_search(&tmp, -1);
- if (find) elm_object_item_focus_set(tmp, EINA_TRUE);
- else
+ if (find)
{
- elm_object_item_focus_set(it, EINA_FALSE);
- sd->focused_item = NULL;
+ elm_object_item_focus_set(EO_OBJ(tmp), EINA_TRUE);
+ goto end;
}
}
+failed:
+ elm_object_item_focus_set(EO_OBJ(it), EINA_FALSE);
+ sd->focused_item = NULL;
}
+end:
if (it == sd->key_down_item) sd->key_down_item = NULL;
if (it == sd->highlighted_item) sd->highlighted_item = NULL;
#ifndef TIZEN_PROFILE_WEARABLE