[*][elm_widget] merge with 65399 & 65400 for fixing focus problem
authorWooHyun Jung <wh0705.jung@samsung.com>
Sat, 19 Nov 2011 04:34:04 +0000 (13:34 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Sat, 19 Nov 2011 04:34:04 +0000 (13:34 +0900)
src/lib/elm_widget.c

index 1e0f8f6..dd42f49 100644 (file)
@@ -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);