elm_box: only allow focus to widgets of a box

all other should not get focus
This commit is contained in:
Marcel Hollerbach 2017-10-25 14:29:31 +02:00
parent 53fcc4bb7d
commit 5a3ee984a1
1 changed files with 9 additions and 0 deletions

View File

@ -26,9 +26,18 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
static void
_elm_box_efl_ui_focus_composition_prepare(Eo *obj, Elm_Box_Data *pd EINA_UNUSED)
{
Eina_List *n, *nn;
Elm_Widget *elem;
Elm_Widget_Smart_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_CLASS);
Eina_List *order = evas_object_box_children_get(wpd->resize_obj);
EINA_LIST_FOREACH_SAFE(order, n, nn, elem)
{
if (!efl_isa(elem, ELM_WIDGET_CLASS))
order = eina_list_remove(order, elem);
}
efl_ui_focus_composition_elements_set(obj, order);
}