From e898c9b9f3853d114f968a68f24b0aee8ba0bf30 Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Fri, 11 Sep 2020 17:21:19 +0900 Subject: [PATCH] ui_widget: restore hide callback for sub-object 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 61b177b..32e9353 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -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; } -- 2.7.4