forked from enlightenment/efl
elementary : child_can_focus should be EINA_FALSE only when all
children in the object tree were not focusable. SVN revision: 71573
This commit is contained in:
parent
bdeb7e7b07
commit
5f0750f863
|
@ -129,3 +129,9 @@
|
|||
|
||||
* Entry: Add 3 APIs which are elm_entry_text_style_user_push/pop/peek
|
||||
and test functions for these APIs.
|
||||
|
||||
2012-05-31 WooHyun Jung
|
||||
|
||||
* child_can_focus should be EINA_FALSE only when all children in the object
|
||||
tree are not focusable. Before this fix, it was EINA_FALSE when all sub
|
||||
objects were not focusable. (i.e. didn't check whole object tree)
|
||||
|
|
|
@ -406,7 +406,16 @@ _elm_widget_sub_object_add_func(Evas_Object *obj,
|
|||
sdc->parent_obj = obj;
|
||||
_elm_widget_top_win_focused_set(sobj, sd->top_win_focused);
|
||||
if (!sd->child_can_focus && (_is_focusable(sobj)))
|
||||
sd->child_can_focus = EINA_TRUE;
|
||||
{
|
||||
Elm_Widget_Smart_Data *sdt = evas_object_smart_data_get(obj);
|
||||
sdt->child_can_focus = EINA_TRUE;
|
||||
while (sdt->parent_obj)
|
||||
{
|
||||
sdt = evas_object_smart_data_get(sdt->parent_obj);
|
||||
if (sdt->child_can_focus) break;
|
||||
sdt->child_can_focus = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -485,17 +494,22 @@ _elm_widget_sub_object_del_func(Evas_Object *obj,
|
|||
{
|
||||
Evas_Object *subobj;
|
||||
const Eina_List *l;
|
||||
|
||||
sd->child_can_focus = EINA_FALSE;
|
||||
|
||||
EINA_LIST_FOREACH (sd->subobjs, l, subobj)
|
||||
Elm_Widget_Smart_Data *sdt = evas_object_smart_data_get(obj);
|
||||
while (1)
|
||||
{
|
||||
if (_is_focusable(subobj))
|
||||
sdt->child_can_focus = EINA_FALSE;
|
||||
EINA_LIST_FOREACH(sdt->subobjs, l, subobj)
|
||||
{
|
||||
sd->child_can_focus = EINA_TRUE;
|
||||
if ((subobj != sobj) && (_is_focusable(subobj)))
|
||||
{
|
||||
sdt->child_can_focus = EINA_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sdt->child_can_focus) break;
|
||||
if (!sdt->parent_obj) break;
|
||||
sdt = evas_object_smart_data_get(sdt->parent_obj);
|
||||
}
|
||||
}
|
||||
|
||||
ELM_WIDGET_DATA_GET(sobj, sdc);
|
||||
|
@ -1505,7 +1519,16 @@ elm_widget_sub_object_add(Evas_Object *obj,
|
|||
sd2->parent_obj = obj;
|
||||
_elm_widget_top_win_focused_set(sobj, sd->top_win_focused);
|
||||
if (!sd->child_can_focus && (_is_focusable(sobj)))
|
||||
sd->child_can_focus = EINA_TRUE;
|
||||
{
|
||||
Elm_Widget_Smart_Data *sdt = evas_object_smart_data_get(obj);
|
||||
sdt->child_can_focus = EINA_TRUE;
|
||||
while (sdt->parent_obj)
|
||||
{
|
||||
sdt = evas_object_smart_data_get(sdt->parent_obj);
|
||||
if (sdt->child_can_focus) break;
|
||||
sdt->child_can_focus = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1575,15 +1598,22 @@ elm_widget_sub_object_del(Evas_Object *obj,
|
|||
{
|
||||
Evas_Object *subobj;
|
||||
const Eina_List *l;
|
||||
sd->child_can_focus = EINA_FALSE;
|
||||
EINA_LIST_FOREACH(sd->subobjs, l, subobj)
|
||||
Elm_Widget_Smart_Data *sdt = evas_object_smart_data_get(obj);
|
||||
while (1)
|
||||
{
|
||||
if (_is_focusable(subobj))
|
||||
sdt->child_can_focus = EINA_FALSE;
|
||||
EINA_LIST_FOREACH(sdt->subobjs, l, subobj)
|
||||
{
|
||||
sd->child_can_focus = EINA_TRUE;
|
||||
if ((subobj != sobj) && (_is_focusable(subobj)))
|
||||
{
|
||||
sdt->child_can_focus = EINA_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sdt->child_can_focus) break;
|
||||
if (!sdt->parent_obj) break;
|
||||
sdt = evas_object_smart_data_get(sdt->parent_obj);
|
||||
}
|
||||
}
|
||||
Elm_Widget_Smart_Data *sd2 = evas_object_smart_data_get(sobj);
|
||||
if (sd2)
|
||||
|
|
Loading…
Reference in New Issue