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
|
* Entry: Add 3 APIs which are elm_entry_text_style_user_push/pop/peek
|
||||||
and test functions for these APIs.
|
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;
|
sdc->parent_obj = obj;
|
||||||
_elm_widget_top_win_focused_set(sobj, sd->top_win_focused);
|
_elm_widget_top_win_focused_set(sobj, sd->top_win_focused);
|
||||||
if (!sd->child_can_focus && (_is_focusable(sobj)))
|
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
|
else
|
||||||
|
@ -485,16 +494,21 @@ _elm_widget_sub_object_del_func(Evas_Object *obj,
|
||||||
{
|
{
|
||||||
Evas_Object *subobj;
|
Evas_Object *subobj;
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
|
Elm_Widget_Smart_Data *sdt = evas_object_smart_data_get(obj);
|
||||||
sd->child_can_focus = EINA_FALSE;
|
while (1)
|
||||||
|
|
||||||
EINA_LIST_FOREACH (sd->subobjs, l, subobj)
|
|
||||||
{
|
{
|
||||||
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)))
|
||||||
break;
|
{
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1505,7 +1519,16 @@ elm_widget_sub_object_add(Evas_Object *obj,
|
||||||
sd2->parent_obj = obj;
|
sd2->parent_obj = obj;
|
||||||
_elm_widget_top_win_focused_set(sobj, sd->top_win_focused);
|
_elm_widget_top_win_focused_set(sobj, sd->top_win_focused);
|
||||||
if (!sd->child_can_focus && (_is_focusable(sobj)))
|
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
|
else
|
||||||
|
@ -1575,14 +1598,21 @@ elm_widget_sub_object_del(Evas_Object *obj,
|
||||||
{
|
{
|
||||||
Evas_Object *subobj;
|
Evas_Object *subobj;
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
sd->child_can_focus = EINA_FALSE;
|
Elm_Widget_Smart_Data *sdt = evas_object_smart_data_get(obj);
|
||||||
EINA_LIST_FOREACH(sd->subobjs, l, subobj)
|
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)))
|
||||||
break;
|
{
|
||||||
|
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);
|
Elm_Widget_Smart_Data *sd2 = evas_object_smart_data_get(sobj);
|
||||||
|
|
Loading…
Reference in New Issue