ui_widget: restore hide callback for sub-object 37/243937/1 accepted/tizen/unified/20200914.131356 submit/tizen/20200913.215058
authorYeongjong Lee <yj34.lee@samsung.com>
Fri, 11 Sep 2020 08:21:19 +0000 (17:21 +0900)
committerYeongjong Lee <yj34.lee@samsung.com>
Fri, 11 Sep 2020 08:28:14 +0000 (17:28 +0900)
In commit 8d47ced0497c7d24203a16c5011c57928822024e, hide callback to restore
focus was removed. this patch restores the hide callback to fix focus issue
when hiding a focused widgets.

@tizen_fix

Change-Id: I07cd3bcc329316a03a6e418141c11403a7d49d0d

src/lib/elementary/efl_ui_widget.c

index 61b177b..32e9353 100644 (file)
@@ -1712,6 +1712,11 @@ _efl_ui_widget_widget_sub_object_add(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Ob
    //first add it to our own children list
    _widget_add_sub(obj, sd, sobj);
 
+   //TIZEN_ONLY(20200911): restore hide callback for sub-object
+   if (is_widget)
+     efl_event_callback_add(sobj, EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED, _on_sub_obj_hide, obj);
+   //
+
    //and if it is a widget, please set the correct parent on the widget itself
    //the parent set method will take care of the property syncing etc.
    if (is_widget)
@@ -1861,6 +1866,11 @@ _efl_ui_widget_widget_sub_object_del(Eo *obj, Elm_Widget_Smart_Data *sd, Evas_Ob
 
    _widget_del_sub(obj, sd, sobj);
 
+   //TIZEN_ONLY(20200911): restore hide callback for sub-object
+   if (is_widget)
+     efl_event_callback_del(sobj, EFL_GFX_ENTITY_EVENT_VISIBILITY_CHANGED, _on_sub_obj_hide, obj);
+   //
+
    return EINA_TRUE;
 }