From d996e45e71e451c2cbb6defbcb31be7316d9a31d Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Sat, 19 Nov 2011 13:34:04 +0900 Subject: [PATCH] [*][elm_widget] merge with 65399 & 65400 for fixing focus problem --- src/lib/elm_widget.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index 1e0f8f6..dd42f49 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -982,18 +982,11 @@ elm_widget_sub_object_del(Evas_Object *obj, } if (_elm_widget_is(sobj)) { - Smart_Data *sd2 = evas_object_smart_data_get(sobj); - if (sd2) + if (elm_widget_focus_get(sobj)) { - sd2->parent_obj = NULL; - if (sd2->resize_obj == sobj) - sd2->resize_obj = NULL; - else - sd->subobjs = eina_list_remove(sd->subobjs, sobj); + elm_widget_tree_unfocusable_set(sobj, EINA_TRUE); + elm_widget_tree_unfocusable_set(sobj, EINA_FALSE); } - else - sd->subobjs = eina_list_remove(sd->subobjs, sobj); - if (elm_widget_focus_get(sobj)) _unfocus_parents(obj); if ((sd->child_can_focus) && (_is_focusable(sobj))) { Evas_Object *subobj; @@ -1008,6 +1001,17 @@ elm_widget_sub_object_del(Evas_Object *obj, } } } + Smart_Data *sd2 = evas_object_smart_data_get(sobj); + if (sd2) + { + sd2->parent_obj = NULL; + if (sd2->resize_obj == sobj) + sd2->resize_obj = NULL; + else + sd->subobjs = eina_list_remove(sd->subobjs, sobj); + } + else + sd->subobjs = eina_list_remove(sd->subobjs, sobj); } else sd->subobjs = eina_list_remove(sd->subobjs, sobj); -- 2.7.4