From: Yeongjong Lee Date: Mon, 21 Oct 2019 08:04:04 +0000 (+0900) Subject: elm_widget: disable focus manager in tizen X-Git-Tag: accepted/tizen/unified/20191022.222702~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F25%2F216125%2F2;p=platform%2Fupstream%2Fefl.git elm_widget: disable focus manager in tizen `@empty` tag will disable efl_ui_focus_* functions which means focus manager code doesn't work anymore in tizen. @tizne_fix Change-Id: Ie7bf0c485fde997a11b171a62d53ac78eebf8573 --- diff --git a/src/lib/elementary/efl_ui_calendar_item.eo b/src/lib/elementary/efl_ui_calendar_item.eo index 6fce49b..9f25290 100644 --- a/src/lib/elementary/efl_ui_calendar_item.eo +++ b/src/lib/elementary/efl_ui_calendar_item.eo @@ -15,8 +15,8 @@ class @beta Efl.Ui.Calendar_Item extends Efl.Object implements Efl.Ui.Focus.Obje } } implements { - Efl.Ui.Focus.Object.focus {set;} - Efl.Ui.Focus.Object.focus_parent {get;} - Efl.Ui.Focus.Object.focus_geometry {get;} + @empty Efl.Ui.Focus.Object.focus {set;} + @empty Efl.Ui.Focus.Object.focus_parent {get;} + @empty Efl.Ui.Focus.Object.focus_geometry {get;} } } diff --git a/src/lib/elementary/efl_ui_clock.c b/src/lib/elementary/efl_ui_clock.c index 5035fdd..9e6bf2e 100644 --- a/src/lib/elementary/efl_ui_clock.c +++ b/src/lib/elementary/efl_ui_clock.c @@ -648,15 +648,7 @@ _efl_ui_clock_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Clock_Data *sd int_ret = efl_ui_focus_object_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; - //TIZEN_ONLY(20180607): Restore legacy focus - Eina_Bool focused = EINA_FALSE; - if (elm_widget_is_legacy(obj)) - focused = elm_widget_focus_get(obj); - else - focused = efl_ui_focus_object_focus_get(obj); - if (!focused) - //if (!efl_ui_focus_object_focus_get(obj)) - // + if (!elm_widget_focus_get(obj)) { Clock_Mod_Api *dt_mod = _dt_mod_init(); if ((dt_mod) && (dt_mod->obj_hide)) diff --git a/src/lib/elementary/efl_ui_collection.eo b/src/lib/elementary/efl_ui_collection.eo index a57e07b..2a1bf8b 100644 --- a/src/lib/elementary/efl_ui_collection.eo +++ b/src/lib/elementary/efl_ui_collection.eo @@ -78,9 +78,9 @@ class Efl.Ui.Collection extends Efl.Ui.Layout_Base implements Efl.Pack_Linear.pack_index_get; Efl.Pack_Linear.pack_content_get; Efl.Ui.Scrollable.match_content { set; } - Efl.Ui.Widget_Focus_Manager.focus_manager_create; - Efl.Ui.Widget.focus_state_apply; - Efl.Ui.Focus.Manager.move; + @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create; + @empty Efl.Ui.Widget.focus_state_apply; + @empty Efl.Ui.Focus.Manager.move; Efl.Ui.Single_Selectable.last_selected { get; } Efl.Ui.Multi_Selectable.selected_iterator_new; Efl.Ui.Multi_Selectable.select_mode {get; set;} diff --git a/src/lib/elementary/efl_ui_collection_focus_manager.eo b/src/lib/elementary/efl_ui_collection_focus_manager.eo index fb3978c..1f636a9 100644 --- a/src/lib/elementary/efl_ui_collection_focus_manager.eo +++ b/src/lib/elementary/efl_ui_collection_focus_manager.eo @@ -1,7 +1,7 @@ class @beta Efl.Ui.Collection_Focus_Manager extends Efl.Ui.Focus.Manager_Calc { [[Internal class which implements collection specific behaviour, cannot be used outside of @Efl.Ui.Collection.]] implements { - Efl.Ui.Focus.Manager.manager_focus { set; } - Efl.Ui.Focus.Manager.request_move; + @empty Efl.Ui.Focus.Manager.manager_focus { set; } + @empty Efl.Ui.Focus.Manager.request_move; } } diff --git a/src/lib/elementary/efl_ui_collection_view.eo b/src/lib/elementary/efl_ui_collection_view.eo index 4bbbf97..fd0ca1f 100644 --- a/src/lib/elementary/efl_ui_collection_view.eo +++ b/src/lib/elementary/efl_ui_collection_view.eo @@ -49,9 +49,9 @@ class Efl.Ui.Collection_View extends Efl.Ui.Layout_Base implements Efl.Ui.Widget.theme_apply; Efl.Ui.Scrollable.match_content { set; } - Efl.Ui.Widget_Focus_Manager.focus_manager_create; - Efl.Ui.Focus.Manager.move; - Efl.Ui.Widget.focus_state_apply; + @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create; + @empty Efl.Ui.Focus.Manager.move; + @empty Efl.Ui.Widget.focus_state_apply; } events { item,realized : Efl.Ui.Item; [[Event triggered when an @Efl.Ui.Item has been provided by the @Efl.Ui.Factory and is about to be used.]] diff --git a/src/lib/elementary/efl_ui_collection_view_focus_manager.eo b/src/lib/elementary/efl_ui_collection_view_focus_manager.eo index bd4e277..f6bd244 100644 --- a/src/lib/elementary/efl_ui_collection_view_focus_manager.eo +++ b/src/lib/elementary/efl_ui_collection_view_focus_manager.eo @@ -1,7 +1,7 @@ class @beta Efl.Ui.Collection_View_Focus_Manager extends Efl.Ui.Focus.Manager_Calc { [[Internal class which implements collection specific behaviour, cannot be used outside of collection]] implements { - Efl.Ui.Focus.Manager.manager_focus { set; } - Efl.Ui.Focus.Manager.request_move; + @empty Efl.Ui.Focus.Manager.manager_focus { set; } + @empty Efl.Ui.Focus.Manager.request_move; } } diff --git a/src/lib/elementary/efl_ui_focus_composition.eo b/src/lib/elementary/efl_ui_focus_composition.eo index a829015..ffaaf47 100644 --- a/src/lib/elementary/efl_ui_focus_composition.eo +++ b/src/lib/elementary/efl_ui_focus_composition.eo @@ -40,8 +40,11 @@ mixin @beta Efl.Ui.Focus.Composition requires Efl.Ui.Widget { } implements { Efl.Object.invalidate; - Efl.Ui.Widget.focus_state_apply; - Efl.Ui.Focus.Object.setup_order_non_recursive; + @empty Efl.Ui.Widget.focus_state_apply; + @empty Efl.Ui.Focus.Object.setup_order_non_recursive; @empty .prepare; + @empty .composition_elements; + @empty .dirty; + @empty .logical_mode; } } diff --git a/src/lib/elementary/efl_ui_focus_composition_adapter.eo b/src/lib/elementary/efl_ui_focus_composition_adapter.eo index 98d548c..98a77cf 100644 --- a/src/lib/elementary/efl_ui_focus_composition_adapter.eo +++ b/src/lib/elementary/efl_ui_focus_composition_adapter.eo @@ -27,10 +27,13 @@ class @beta Efl.Ui.Focus.Composition_Adapter extends Efl.Object implements Efl.U } } implements { - Efl.Ui.Focus.Object.focus_geometry {get;} - Efl.Ui.Focus.Object.focus_parent {get;} - Efl.Ui.Focus.Object.focus_manager {get;} - Efl.Ui.Focus.Object.focus {set;} + @empty Efl.Ui.Focus.Object.focus_geometry {get;} + @empty Efl.Ui.Focus.Object.focus_parent {get;} + @empty Efl.Ui.Focus.Object.focus_manager {get;} + @empty Efl.Ui.Focus.Object.focus {set;} + @empty .canvas_object; + @empty .focus_manager_object; + @empty .focus_manager_parent; Efl.Object.destructor; } } diff --git a/src/lib/elementary/efl_ui_focus_layer.c b/src/lib/elementary/efl_ui_focus_layer.c index 944cf7d..ccbe1d3 100644 --- a/src/lib/elementary/efl_ui_focus_layer.c +++ b/src/lib/elementary/efl_ui_focus_layer.c @@ -29,10 +29,7 @@ EOLIAN static void _efl_ui_focus_layer_efl_gfx_entity_visible_set(Eo *obj, Efl_Ui_Focus_Layer_Data *pd, Eina_Bool v) { efl_gfx_entity_visible_set(efl_super(obj, MY_CLASS), v); - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - return; - // + if (pd->enable_on_visible) { efl_ui_focus_layer_enable_set(obj, v); @@ -60,11 +57,7 @@ _efl_ui_focus_layer_efl_ui_focus_manager_move(Eo *obj, Efl_Ui_Focus_Layer_Data * EOLIAN static void _efl_ui_focus_layer_efl_object_invalidate(Eo *obj, Efl_Ui_Focus_Layer_Data *pd EINA_UNUSED) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) - // - efl_ui_focus_layer_enable_set(obj, EINA_FALSE); - + efl_ui_focus_layer_enable_set(obj, EINA_FALSE); efl_invalidate(efl_super(obj, MY_CLASS)); } @@ -96,10 +89,6 @@ EOLIAN static Efl_Object* _efl_ui_focus_layer_efl_object_constructor(Eo *obj, Efl_Ui_Focus_Layer_Data *pd) { obj = efl_constructor(efl_super(obj, MY_CLASS)); - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - return obj; - // pd->enable_on_visible = EINA_TRUE; pd->cycle = EINA_TRUE; return obj; diff --git a/src/lib/elementary/efl_ui_focus_layer.eo b/src/lib/elementary/efl_ui_focus_layer.eo index 3d07102..768a8d7 100644 --- a/src/lib/elementary/efl_ui_focus_layer.eo +++ b/src/lib/elementary/efl_ui_focus_layer.eo @@ -23,13 +23,15 @@ mixin @beta Efl.Ui.Focus.Layer requires Efl.Ui.Widget extends Efl.Ui.Widget_Focu } } implements { - Efl.Ui.Widget_Focus_Manager.focus_manager_create; - Efl.Ui.Widget.focus_state_apply; + @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create; + @empty Efl.Ui.Widget.focus_state_apply; Efl.Gfx.Entity.visible {set;} - Efl.Ui.Focus.Manager.move; - Efl.Ui.Focus.Object.focus_manager { get; } - Efl.Ui.Focus.Object.focus_parent { get; } + @empty Efl.Ui.Focus.Manager.move; + @empty Efl.Ui.Focus.Object.focus_manager { get; } + @empty Efl.Ui.Focus.Object.focus_parent { get; } Efl.Object.constructor; Efl.Object.invalidate; + @empty .enable; + @empty .behaviour; } } diff --git a/src/lib/elementary/efl_ui_focus_manager_calc.eo b/src/lib/elementary/efl_ui_focus_manager_calc.eo index cd9ad90..b7047ff 100644 --- a/src/lib/elementary/efl_ui_focus_manager_calc.eo +++ b/src/lib/elementary/efl_ui_focus_manager_calc.eo @@ -84,24 +84,31 @@ class @beta Efl.Ui.Focus.Manager_Calc extends Efl.Object implements Efl.Ui.Focus implements { class.constructor; class.destructor; - Efl.Ui.Focus.Manager.move; - Efl.Ui.Focus.Manager.request_move; - Efl.Ui.Focus.Manager.manager_focus {get; set;} - Efl.Ui.Focus.Manager.redirect {set; get;} - Efl.Ui.Focus.Manager.border_elements {get;} - Efl.Ui.Focus.Manager.viewport_elements {get;} - Efl.Ui.Focus.Manager.root {set; get;} - Efl.Ui.Focus.Manager.request_subchild; - Efl.Ui.Focus.Manager.fetch; - Efl.Ui.Focus.Manager.logical_end; - Efl.Ui.Focus.Manager.reset_history; - Efl.Ui.Focus.Manager.pop_history_stack; - Efl.Ui.Focus.Manager.setup_on_first_touch; - Efl.Ui.Focus.Manager.dirty_logic_freeze; - Efl.Ui.Focus.Manager.dirty_logic_unfreeze; + @empty Efl.Ui.Focus.Manager.move; + @empty Efl.Ui.Focus.Manager.request_move; + @empty Efl.Ui.Focus.Manager.manager_focus {get; set;} + @empty Efl.Ui.Focus.Manager.redirect {set; get;} + @empty Efl.Ui.Focus.Manager.border_elements {get;} + @empty Efl.Ui.Focus.Manager.viewport_elements {get;} + @empty Efl.Ui.Focus.Manager.root {set; get;} + @empty Efl.Ui.Focus.Manager.request_subchild; + @empty Efl.Ui.Focus.Manager.fetch; + @empty Efl.Ui.Focus.Manager.logical_end; + @empty Efl.Ui.Focus.Manager.reset_history; + @empty Efl.Ui.Focus.Manager.pop_history_stack; + @empty Efl.Ui.Focus.Manager.setup_on_first_touch; + @empty Efl.Ui.Focus.Manager.dirty_logic_freeze; + @empty Efl.Ui.Focus.Manager.dirty_logic_unfreeze; Efl.Object.constructor; Efl.Object.finalize; Efl.Object.provider_find; Efl.Object.destructor; + @empty .register; + @empty .register_logical; + @empty .update_redirect; + @empty .update_parent; + @empty .update_children; + @empty .update_order; + @empty .unregister; } } diff --git a/src/lib/elementary/efl_ui_focus_manager_root_focus.eo b/src/lib/elementary/efl_ui_focus_manager_root_focus.eo index 1572e77..01e084f 100644 --- a/src/lib/elementary/efl_ui_focus_manager_root_focus.eo +++ b/src/lib/elementary/efl_ui_focus_manager_root_focus.eo @@ -12,16 +12,17 @@ class @beta Efl.Ui.Focus.Manager_Root_Focus extends Efl.Ui.Focus.Manager_Calc { } } implements { - Efl.Ui.Focus.Manager_Calc.register_logical; - Efl.Ui.Focus.Manager_Calc.register; - Efl.Ui.Focus.Manager_Calc.unregister; - Efl.Ui.Focus.Manager.manager_focus {set; get;} - Efl.Ui.Focus.Manager.fetch; - Efl.Ui.Focus.Manager.logical_end; - Efl.Ui.Focus.Manager.border_elements {get;} - Efl.Ui.Focus.Manager.viewport_elements {get;} - Efl.Ui.Focus.Manager.request_move; - Efl.Ui.Focus.Manager.move; + @empty Efl.Ui.Focus.Manager_Calc.register_logical; + @empty Efl.Ui.Focus.Manager_Calc.register; + @empty Efl.Ui.Focus.Manager_Calc.unregister; + @empty Efl.Ui.Focus.Manager.manager_focus {set; get;} + @empty Efl.Ui.Focus.Manager.fetch; + @empty Efl.Ui.Focus.Manager.logical_end; + @empty Efl.Ui.Focus.Manager.border_elements {get;} + @empty Efl.Ui.Focus.Manager.viewport_elements {get;} + @empty Efl.Ui.Focus.Manager.request_move; + @empty Efl.Ui.Focus.Manager.move; + @empty .canvas_object; Efl.Object.constructor; Efl.Object.destructor; Efl.Object.finalize; diff --git a/src/lib/elementary/efl_ui_focus_manager_sub.eo b/src/lib/elementary/efl_ui_focus_manager_sub.eo index eaf0075..a551048 100644 --- a/src/lib/elementary/efl_ui_focus_manager_sub.eo +++ b/src/lib/elementary/efl_ui_focus_manager_sub.eo @@ -16,6 +16,6 @@ mixin @beta Efl.Ui.Focus.Manager_Sub requires Efl.Object extends Efl.Ui.Focus.Ma implements { Efl.Object.constructor; Efl.Object.destructor; - Efl.Ui.Focus.Manager.move; + @empty Efl.Ui.Focus.Manager.move; } } diff --git a/src/lib/elementary/efl_ui_focus_object.eo b/src/lib/elementary/efl_ui_focus_object.eo index 2de9620..3694165 100644 --- a/src/lib/elementary/efl_ui_focus_object.eo +++ b/src/lib/elementary/efl_ui_focus_object.eo @@ -76,6 +76,9 @@ mixin Efl.Ui.Focus.Object @empty .focus_manager; @empty .focus_parent; @empty .on_focus_update; + @empty .setup_order; + @empty .child_focus; + @empty .focus; } events { focus,changed : bool; [[Emitted if the focus state has changed.]] diff --git a/src/lib/elementary/efl_ui_focus_parent_provider_standard.eo b/src/lib/elementary/efl_ui_focus_parent_provider_standard.eo index ba9745d..6e63387 100644 --- a/src/lib/elementary/efl_ui_focus_parent_provider_standard.eo +++ b/src/lib/elementary/efl_ui_focus_parent_provider_standard.eo @@ -5,6 +5,6 @@ class @beta Efl.Ui.Focus.Parent_Provider_Standard extends Efl.Object implements the widget's parent as the focus parent. ]] implements { - Efl.Ui.Focus.Parent_Provider.find_logical_parent; + @empty Efl.Ui.Focus.Parent_Provider.find_logical_parent; } } diff --git a/src/lib/elementary/efl_ui_focus_util.c b/src/lib/elementary/efl_ui_focus_util.c index 8914897..8099eb3 100644 --- a/src/lib/elementary/efl_ui_focus_util.c +++ b/src/lib/elementary/efl_ui_focus_util.c @@ -27,6 +27,10 @@ _can_take_focus(Efl_Ui_Focus_Manager *m, Efl_Ui_Focus_Object *user) EOLIAN static void _efl_ui_focus_util_focus(Efl_Ui_Focus_Object *user) { + //TIZEN_ONLY(20191021): disable focus manager + return; + // + /* Efl_Ui_Focus_Object *entry; Efl_Ui_Widget *top, *o; Efl_Ui_Focus_Manager *m, *registered_manager; @@ -61,20 +65,30 @@ _efl_ui_focus_util_focus(Efl_Ui_Focus_Object *user) { efl_ui_focus_manager_focus_set(registered_manager, user); } + */ } EOLIAN static Efl_Ui_Focus_Manager* _efl_ui_focus_util_active_manager(Efl_Ui_Focus_Manager *manager) { + //TIZEN_ONLY(20191021): disable focus manager + return NULL; + // + /* while (efl_ui_focus_manager_redirect_get(manager)) manager = efl_ui_focus_manager_redirect_get(manager); return manager; + */ } EOLIAN static Efl_Ui_Focus_Direction _efl_ui_focus_util_direction_complement(Efl_Ui_Focus_Direction dir) { + //TIZEN_ONLY(20191021): disable focus manager + return EFL_UI_FOCUS_DIRECTION_LAST; + // + /* #define COMP(a,b) \ if (dir == a) return b; \ if (dir == b) return a; @@ -86,6 +100,7 @@ _efl_ui_focus_util_direction_complement(Efl_Ui_Focus_Direction dir) #undef COMP return EFL_UI_FOCUS_DIRECTION_LAST; + */ } diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index a7fbc78..7d2bbd0 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -726,16 +726,8 @@ _efl_ui_layout_base_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Layout_D ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); if (!elm_widget_can_focus_get(obj)) return EINA_FALSE; - //TIZEN_ONLY(20180607): Restore legacy focus - Eina_Bool focused = EINA_FALSE; - if (elm_widget_is_legacy(obj)) - focused = elm_widget_focus_get(obj); - else - focused = efl_ui_focus_object_focus_get(obj); - if (focused) - //if (efl_ui_focus_object_focus_get(obj)) - // + if (efl_ui_focus_object_focus_get(obj)) { if (elm_widget_is_legacy(obj)) elm_layout_signal_emit(obj, "elm,action,focus", "elm"); diff --git a/src/lib/elementary/efl_ui_scroller.eo b/src/lib/elementary/efl_ui_scroller.eo index 2331bcf..4b3b40b 100644 --- a/src/lib/elementary/efl_ui_scroller.eo +++ b/src/lib/elementary/efl_ui_scroller.eo @@ -26,9 +26,9 @@ class Efl.Ui.Scroller extends Efl.Ui.Layout_Base implements Efl.Content.content_unset; Efl.Canvas.Group.group_calculate; Efl.Ui.Widget.theme_apply; - Efl.Ui.Widget.focus_state_apply; + @empty Efl.Ui.Widget.focus_state_apply; Efl.Ui.Widget.widget_input_event_handler; - Efl.Ui.Widget_Focus_Manager.focus_manager_create; + @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create; Efl.Ui.Scrollable.match_content { set; } } } diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 3a4f957..732aa9a 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -40,18 +40,11 @@ ELM_WIDGET_DATA_GET(obj, sd); \ if (!sd) return -//TIZEN_ONLY(20180607): Restore legacy focus -/* #define ELM_WIDGET_FOCUS_GET(obj) \ (efl_isa(obj, EFL_UI_WIDGET_CLASS) && \ ((_elm_access_auto_highlight_get()) ? (elm_widget_highlight_get(obj)) : \ (efl_ui_focus_object_focus_get(obj)))) -*/ -#define ELM_WIDGET_FOCUS_GET(obj) \ - (efl_isa(obj, EFL_UI_WIDGET_CLASS) && \ - ((_elm_access_auto_highlight_get()) ? (elm_widget_highlight_get(obj)) : \ - (elm_widget_is_legacy(obj) ? elm_widget_focus_get(obj) : efl_ui_focus_object_focus_get(obj)))) -// + const char SIG_WIDGET_FOCUSED[] = "focused"; const char SIG_WIDGET_UNFOCUSED[] = "unfocused"; const char SIG_WIDGET_LANG_CHANGED[] = "language,changed"; @@ -534,8 +527,7 @@ static Efl_Ui_Focus_Object* _logical_parent_eval(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina_Bool should, Eina_Bool *state_change_to_parent) { //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - return NULL; + return NULL; // Efl_Ui_Widget *parent; Efl_Ui_Focus_Parent_Provider *provider; @@ -600,8 +592,7 @@ static void _full_eval(Eo *obj, Elm_Widget_Smart_Data *pd) { //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - return; + return; // Efl_Ui_Focus_Object *old_parent; Efl_Ui_Focus_Object *old_registered_parent, *old_registered_manager; @@ -883,11 +874,8 @@ _efl_ui_widget_efl_canvas_group_group_del(Eo *obj, Elm_Widget_Smart_Data *sd) eina_stringshare_del(sd->style); if (sd->theme) elm_theme_free(sd->theme); //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - { - _if_focused_revert(obj, EINA_TRUE); - efl_ui_widget_focus_custom_chain_unset(obj); - } + _if_focused_revert(obj, EINA_TRUE); + efl_ui_widget_focus_custom_chain_unset(obj); // eina_stringshare_del(sd->access_info); eina_stringshare_del(sd->accessible_name); @@ -958,8 +946,7 @@ void _elm_widget_full_eval_children(Eo *obj, Elm_Widget_Smart_Data *sd) { //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - return; + return; // Eina_List *l; Eo *child; @@ -2781,10 +2768,7 @@ _efl_ui_widget_disabled_set(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina { //TIZEN_ONLY(20180607): Restore legacy focus if (elm_widget_is(subs)) - { - if (elm_widget_is_legacy(subs)) - efl_ui_widget_focus_disabled_handle((Evas_Object *)subs); - } + efl_ui_widget_focus_disabled_handle((Evas_Object *)subs); // if (efl_isa(subs, EFL_UI_WIDGET_CLASS)) efl_ui_widget_disabled_set(subs, efl_ui_widget_disabled_get(obj)); @@ -3697,25 +3681,21 @@ elm_widget_focus_mouse_up_handle(Eo *obj) if (!_is_focusable(obj)) return; - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - { - Evas_Object *o = obj; - do - { - if (_elm_widget_is(o)) break; - o = evas_object_smart_parent_get(o); - } - while (o); - - efl_ui_widget_focus_mouse_up_handle(o); - return; - } - // + /* TIZEN_ONLY(20180607): Restore legacy focus if (pd->focus.manager && !pd->focus.logical) { efl_ui_focus_util_focus(obj); } + */ + Evas_Object *o = obj; + do + { + if (_elm_widget_is(o)) break; + o = evas_object_smart_parent_get(o); + } + while (o); + + efl_ui_widget_focus_mouse_up_handle(o); } // TIZEN_ONLY(20190821): keep legacy focus logic @@ -5780,24 +5760,16 @@ _efl_ui_widget_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Widget_Smart_Dat if (!elm_widget_can_focus_get(obj)) return EINA_FALSE; - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - focused = elm_widget_focus_get(obj); - else - // - focused = efl_ui_focus_object_focus_get(obj); + focused = efl_ui_focus_object_focus_get(obj); if (!sd->resize_obj) evas_object_focus_set(obj, focused); //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - { - if (focused) - evas_object_smart_callback_call(obj, "focused", NULL); - else - evas_object_smart_callback_call(obj, "unfocused", NULL); - } + if (focused) + evas_object_smart_callback_call(obj, "focused", NULL); + else + evas_object_smart_callback_call(obj, "unfocused", NULL); // if (_elm_atspi_enabled() && !elm_widget_child_can_focus_get(obj)) diff --git a/src/lib/elementary/efl_ui_widget.eo b/src/lib/elementary/efl_ui_widget.eo index 8f1e3c6..ba866b8 100644 --- a/src/lib/elementary/efl_ui_widget.eo +++ b/src/lib/elementary/efl_ui_widget.eo @@ -672,10 +672,10 @@ abstract Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Object, Efl.Access.Object.access_children { get; } Efl.Access.Object.attributes { get; } Efl.Access.Component.focus_grab; - Efl.Ui.Focus.Object.focus_manager { get; } - Efl.Ui.Focus.Object.focus_parent { get; } - Efl.Ui.Focus.Object.focus_geometry { get; } - Efl.Ui.Focus.Object.focus { set; } + @empty Efl.Ui.Focus.Object.focus_manager { get; } + @empty Efl.Ui.Focus.Object.focus_parent { get; } + @empty Efl.Ui.Focus.Object.focus_geometry { get; } + @empty Efl.Ui.Focus.Object.focus { set; } Efl.Ui.I18n.mirrored { get; set; [[This sets the mirror state of the whole sub-tree. ]] } Efl.Ui.I18n.mirrored_automatic { get; set; } Efl.Ui.Focus.Object.on_focus_update; diff --git a/src/lib/elementary/efl_ui_widget_focus_manager.c b/src/lib/elementary/efl_ui_widget_focus_manager.c index e5270ad..2e14ce7 100644 --- a/src/lib/elementary/efl_ui_widget_focus_manager.c +++ b/src/lib/elementary/efl_ui_widget_focus_manager.c @@ -21,6 +21,7 @@ _efl_ui_widget_focus_manager_efl_object_constructor(Eo *obj, Efl_Ui_Widget_Focus { Eo *res = NULL; + /* TIZEN_ONLY(20191021): disable focus manager pd->manager = efl_ui_widget_focus_manager_create(obj, obj); EINA_SAFETY_ON_NULL_RETURN_VAL(pd->manager, res); @@ -28,6 +29,7 @@ _efl_ui_widget_focus_manager_efl_object_constructor(Eo *obj, Efl_Ui_Widget_Focus efl_ref(pd->manager); efl_composite_attach(obj, pd->manager); _efl_ui_focus_manager_redirect_events_add(pd->manager, obj); + */ res = efl_constructor(efl_super(obj, MY_CLASS)); @@ -39,9 +41,11 @@ _efl_ui_widget_focus_manager_efl_object_destructor(Eo *obj, Efl_Ui_Widget_Focus_ { efl_destructor(efl_super(obj, MY_CLASS)); + /* TIZEN_ONLY(20191021): disable focus manager _efl_ui_focus_manager_redirect_events_del(pd->manager, obj); efl_unref(pd->manager); pd->manager = NULL; + */ } EOLIAN static Eina_Bool diff --git a/src/lib/elementary/efl_ui_widget_focus_manager.eo b/src/lib/elementary/efl_ui_widget_focus_manager.eo index 431fea7..1a69c48 100644 --- a/src/lib/elementary/efl_ui_widget_focus_manager.eo +++ b/src/lib/elementary/efl_ui_widget_focus_manager.eo @@ -23,6 +23,6 @@ mixin Efl.Ui.Widget_Focus_Manager implements { Efl.Object.constructor; Efl.Object.destructor; - Efl.Ui.Widget.focus_state_apply; + @empty Efl.Ui.Widget.focus_state_apply; } } diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index c289562..e16009a 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -1633,53 +1633,39 @@ _elm_win_focus_in(Ecore_Evas *ee) ELM_WIN_DATA_ALIVE_CHECK(obj, sd); if (sd->type != EFL_UI_WIN_TYPE_FAKE) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) + /* TIZEN_ONLY(20180607): Restore legacy focus + Efl_Ui_Focus_Manager *man = sd->obj; + while(efl_ui_focus_manager_redirect_get(man)) { - if (!efl_ui_widget_focus_order_get(obj)) - { - efl_ui_widget_focus_steal(obj, NULL); - } - else - { - Evas_Object *newest = NULL; - unsigned int newest_focus_order = 0; - - newest = efl_ui_widget_newest_focus_order_get - (obj, &newest_focus_order, EINA_TRUE); - // TIZEN_ONLY (20180508): onscreen_is should not be checked - // to keep compatibility with Tizen 2.4 - /* - if (newest && - (_elm_widget_onscreen_is(newest) || (newest == obj))) - efl_ui_widget_focus_restore(obj); - */ - if (newest) efl_ui_widget_focus_restore(obj); - ///////////////////////////////////////////////////////////// - else - evas_object_focus_set(obj, EINA_TRUE); - } + man = efl_ui_focus_manager_redirect_get(man); + } + + Evas_Object *focused = efl_ui_focus_manager_focus_get(man); + if (focused) + efl_ui_focus_object_focus_set(focused, EINA_TRUE); + */ + if (!efl_ui_widget_focus_order_get(obj)) + { + efl_ui_widget_focus_steal(obj, NULL); } else - // { - Efl_Ui_Focus_Manager *man = sd->obj; - while(efl_ui_focus_manager_redirect_get(man)) - { - man = efl_ui_focus_manager_redirect_get(man); - } + Evas_Object *newest = NULL; + unsigned int newest_focus_order = 0; - Evas_Object *focused = efl_ui_focus_manager_focus_get(man); - if (focused) - efl_ui_focus_object_focus_set(focused, EINA_TRUE); + newest = efl_ui_widget_newest_focus_order_get + (obj, &newest_focus_order, EINA_TRUE); + if (newest) efl_ui_widget_focus_restore(obj); + else + evas_object_focus_set(obj, EINA_TRUE); } + // } evas_object_smart_callback_call(obj, SIG_FOCUS_IN, NULL); //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) + //evas_object_smart_callback_call(obj, SIG_WIDGET_FOCUSED, NULL); // - evas_object_smart_callback_call(obj, SIG_WIDGET_FOCUSED, NULL); ELM_WIN_DATA_ALIVE_CHECK(obj, sd); sd->focus_highlight.cur.visible = EINA_TRUE; _elm_win_focus_highlight_reconfigure_job_start(sd); @@ -1695,6 +1681,7 @@ _elm_win_focus_in(Ecore_Evas *ee) /* else if (sd->img_obj) */ /* { */ /* } */ + /* TIZEN_ONLY(20180607): Restore legacy focus if ((!efl_ui_focus_manager_focus_get(sd->obj)) && (!efl_ui_focus_manager_redirect_get(sd->obj))) { @@ -1707,6 +1694,7 @@ _elm_win_focus_in(Ecore_Evas *ee) else if (!evas_focus_get(evas_object_evas_get(sd->obj))) evas_object_focus_set(obj, EINA_TRUE); } + */ } static void @@ -1723,9 +1711,8 @@ _elm_win_focus_out(Ecore_Evas *ee) ELM_WIN_DATA_ALIVE_CHECK(obj, sd); evas_object_smart_callback_call(obj, SIG_FOCUS_OUT, NULL); //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) + //evas_object_smart_callback_call(obj, SIG_WIDGET_UNFOCUSED, NULL); // - evas_object_smart_callback_call(obj, SIG_WIDGET_UNFOCUSED, NULL); ELM_WIN_DATA_ALIVE_CHECK(obj, sd); sd->focus_highlight.cur.visible = EINA_FALSE; _elm_win_focus_highlight_reconfigure_job_start(sd); @@ -1740,10 +1727,9 @@ _elm_win_focus_out(Ecore_Evas *ee) efl_access_window_deactivated_signal_emit(obj); efl_access_state_changed_signal_emit(obj, EFL_ACCESS_STATE_TYPE_ACTIVE, EINA_FALSE); } - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj) && sd->type != ELM_WIN_FAKE) - //if (sd->type != EFL_UI_WIN_TYPE_FAKE) - // + + /*TIZEN_ONLY(20180607): Restore legacy focus + if (sd->type != EFL_UI_WIN_TYPE_FAKE) { Efl_Ui_Focus_Manager *man = sd->obj; while(efl_ui_focus_manager_redirect_get(man)) @@ -1754,6 +1740,7 @@ _elm_win_focus_out(Ecore_Evas *ee) Evas_Object *focused = efl_ui_focus_manager_focus_get(man); efl_ui_focus_object_focus_set(focused, EINA_FALSE); } + */ /* do nothing */ /* if (sd->img_obj) */ /* { */ @@ -2326,24 +2313,10 @@ _efl_ui_win_efl_ui_focus_object_on_focus_update(Eo *obj, Efl_Ui_Win_Data *sd) if (!efl_ui_focus_object_on_focus_update(efl_super(obj, MY_CLASS))) return EINA_TRUE; - //TIZEN_ONLY(20180607): Restore legacy focus - Eina_Bool focused; - if (elm_widget_is_legacy(obj)) - focused = elm_widget_focus_get(obj); - else - focused = efl_ui_focus_object_focus_get(obj); - - if (sd->img_obj) - evas_object_focus_set(sd->img_obj, focused); - else - evas_object_focus_set(obj, focused); - /* if (sd->img_obj) evas_object_focus_set(sd->img_obj, efl_ui_focus_object_focus_get(obj)); - else - evas_object_focus_set(obj, efl_ui_focus_object_focus_get(obj)); - */ - // + else + evas_object_focus_set(obj, efl_ui_focus_object_focus_get(obj)); return EINA_TRUE; } @@ -2377,13 +2350,12 @@ _key_action_move(Evas_Object *obj, const char *params) focus_dir = EFL_UI_FOCUS_DIRECTION_DOWN; else return EINA_FALSE; - + //TIZEN_ONLY(20180607): Restore legacy focus + efl_ui_widget_focus_cycle(obj, focus_dir); + /* // The handling for legacy is different due to elm_object_next set if (elm_widget_is_legacy(obj)) - //TIZEN_ONLY(20180607): Restore legacy focus - //elm_object_focus_next(obj, focus_dir); - efl_ui_widget_focus_cycle(obj, focus_dir); - // + elm_object_focus_next(obj, focus_dir); else { Efl_Ui_Widget *o; @@ -2400,7 +2372,7 @@ _key_action_move(Evas_Object *obj, const char *params) } } } - + */ return EINA_TRUE; } @@ -3472,15 +3444,12 @@ _win_img_hide(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(data)) - { - efl_ui_widget_focus_hide_handle(data); - return; - } - // + /* TIZEN_ONLY(20180607): Restore legacy focus Efl_Ui_Win *real_win = elm_widget_top_get(data); efl_ui_focus_manager_redirect_set(real_win, NULL); + */ + efl_ui_widget_focus_hide_handle(data); + // } static void @@ -3500,16 +3469,13 @@ _win_img_focus_in(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(data)) - { - efl_ui_widget_focus_steal(data, NULL); - return; - } - // + /* TIZEN_ONLY(20180607): Restore legacy focus Efl_Ui_Win *real_win = elm_widget_top_get(data); efl_ui_focus_manager_redirect_set(real_win, data); efl_ui_focus_manager_focus_set(data, efl_ui_focus_manager_root_get(data)); + */ + efl_ui_widget_focus_steal(data, NULL); + // } static void @@ -3518,15 +3484,12 @@ _win_img_focus_out(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(data)) - { - efl_ui_widget_focused_object_clear(data); - return; - } - // + /* TIZEN_ONLY(20180607): Restore legacy focus Efl_Ui_Win *real_win = elm_widget_top_get(data); efl_ui_focus_manager_redirect_set(real_win, NULL); + */ + efl_ui_widget_focused_object_clear(data); + // } static void @@ -10376,13 +10339,12 @@ EAPI Eina_Bool elm_win_focus_get(const Efl_Ui_Win *obj) { EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(obj, MY_CLASS), EINA_FALSE); - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - { - ELM_WIN_DATA_GET_OR_RETURN(obj, sd, EINA_FALSE); - return ecore_evas_focus_get(sd->ee); - } + /* TIZEN_ONLY(20180607): Restore legacy focus return efl_ui_focus_object_focus_get(obj); + */ + ELM_WIN_DATA_GET_OR_RETURN(obj, sd, EINA_FALSE); + return ecore_evas_focus_get(sd->ee); + // } EAPI Eina_Bool diff --git a/src/lib/elementary/efl_ui_win.eo b/src/lib/elementary/efl_ui_win.eo index e37b3f5..15d804a 100644 --- a/src/lib/elementary/efl_ui_win.eo +++ b/src/lib/elementary/efl_ui_win.eo @@ -836,10 +836,10 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac that it's not covered by any other window.]] Efl.Gfx.Stack.lower_to_bottom; [[This action is ignored by the Window.]] Efl.Ui.Widget.theme_apply; - Efl.Ui.Focus.Object.focus { get; } + @empty Efl.Ui.Focus.Object.focus { get; } Efl.Ui.Focus.Object.on_focus_update; Efl.Ui.Widget.widget_input_event_handler; - Efl.Ui.Widget_Focus_Manager.focus_manager_create; + @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create; Efl.Access.Object.state_set { get; } Efl.Access.Object.i18n_name { get; } Efl.Access.Component.extents { get; } diff --git a/src/lib/elementary/elc_hoversel.c b/src/lib/elementary/elc_hoversel.c index d7d583d..7f986bd 100644 --- a/src/lib/elementary/elc_hoversel.c +++ b/src/lib/elementary/elc_hoversel.c @@ -647,11 +647,6 @@ EOLIAN static Eina_Bool _elm_hoversel_item_elm_widget_item_item_focus_get(const Eo *eo_it EINA_UNUSED, Elm_Hoversel_Item_Data *it) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(VIEW(it))) - return elm_widget_focus_get(VIEW(it)); - // - return efl_ui_focus_object_focus_get(VIEW(it)); } @@ -936,14 +931,10 @@ _elm_hoversel_item_add(Eo *obj, Elm_Hoversel_Data *sd, const char *label, const evas_object_smart_callback_add(bt, "clicked", _on_item_clicked, item); //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(bt)) - { - evas_object_smart_callback_add(bt, "focused", _item_focused_cb, item); - evas_object_smart_callback_add(bt, "unfocused", _item_unfocused_cb, item); - } - else + evas_object_smart_callback_add(bt, "focused", _item_focused_cb, item); + evas_object_smart_callback_add(bt, "unfocused", _item_unfocused_cb, item); // - efl_event_callback_add(bt, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _item_focus_changed, item); + efl_event_callback_add(bt, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _item_focus_changed, item); sd->items = eina_list_append(sd->items, eo_item); diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c index 6f83267..353a867 100644 --- a/src/lib/elementary/elc_naviframe.c +++ b/src/lib/elementary/elc_naviframe.c @@ -149,27 +149,24 @@ _resize_object_reset(Evas_Object *obj, Elm_Naviframe_Item_Data *it) static void _prev_page_focus_recover(Elm_Naviframe_Item_Data *it) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(it->base->widget)) - { - Evas_Object *newest; - unsigned int order = 0; + /* TIZEN_ONLY(20180607): Restore legacy focus + Elm_Naviframe *n = it->base->widget; + efl_ui_focus_manager_focus_set(efl_ui_focus_object_focus_manager_get(n), n); + */ + Evas_Object *newest; + unsigned int order = 0; - newest = efl_ui_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE); - if (newest) - elm_object_focus_set(newest, EINA_TRUE); + newest = efl_ui_widget_newest_focus_order_get(VIEW(it), &order, EINA_TRUE); + if (newest) + elm_object_focus_set(newest, EINA_TRUE); + else + { + if (elm_object_focus_allow_get(VIEW(it))) + elm_object_focus_set(VIEW(it), EINA_TRUE); else - { - if (elm_object_focus_allow_get(VIEW(it))) - elm_object_focus_set(VIEW(it), EINA_TRUE); - else - elm_object_focus_set(WIDGET(it), EINA_TRUE); - } - return; + elm_object_focus_set(WIDGET(it), EINA_TRUE); } // - Elm_Naviframe *n = it->base->widget; - efl_ui_focus_manager_focus_set(efl_ui_focus_object_focus_manager_get(n), n); } EOLIAN static void @@ -1664,10 +1661,9 @@ _elm_naviframe_efl_canvas_group_group_add(Eo *obj, Elm_Naviframe_Data *priv) evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_obj_size_hints_changed, obj); - elm_widget_can_focus_set(obj, EINA_FALSE); //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - elm_widget_can_focus_set(obj, EINA_TRUE); + //elm_widget_can_focus_set(obj, EINA_FALSE); + elm_widget_can_focus_set(obj, EINA_TRUE); // } @@ -1870,7 +1866,7 @@ _item_push_helper(Elm_Naviframe_Item_Data *item) ELM_NAVIFRAME_ITEM_DATA_GET(eo_top_item, top_item); //TIZEN_ONLY(20180607): Restore legacy focus - if (top_item && elm_widget_is_legacy(obj)) + if (top_item) efl_ui_widget_focused_object_clear(VIEW(top_item)); // _resize_object_reset(obj, item); @@ -2070,8 +2066,7 @@ _elm_naviframe_item_insert_after(Eo *obj, Elm_Naviframe_Data *sd, Elm_Object_Ite if (top_inserted) { //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - efl_ui_widget_focused_object_clear(VIEW(after)); + efl_ui_widget_focused_object_clear(VIEW(after)); // elm_widget_tree_unfocusable_set(VIEW(after), EINA_TRUE); _resize_object_reset(obj, it); diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index f351f3c..cc18b73 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -2239,11 +2239,8 @@ _elm_popup_efl_canvas_group_group_add(Eo *obj, Elm_Popup_Data *priv) efl_event_callback_array_add(priv->notify, _notify_cb(), obj); //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - { - elm_widget_can_focus_set(obj, EINA_TRUE); - elm_widget_can_focus_set(priv->main_layout, EINA_TRUE); - } + elm_widget_can_focus_set(obj, EINA_TRUE); + elm_widget_can_focus_set(priv->main_layout, EINA_TRUE); // _populate_theme_scroll(priv); diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index 2cbeb85..0e663c4 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -1364,16 +1364,7 @@ _elm_entry_efl_ui_widget_theme_apply(Eo *obj, Elm_Entry_Data *sd) if (cursor_pos) elm_entry_cursor_pos_set(obj, cursor_pos); - //TIZEN_ONLY(20180607): Restore legacy focus - Eina_Bool focused; - if (elm_widget_is_legacy(obj)) - focused = elm_widget_focus_get(obj); - else - focused = efl_ui_focus_object_focus_get(obj); - - if (focused) - //if (efl_ui_focus_object_focus_get(obj)) - // + if (efl_ui_focus_object_focus_get(obj)) { edje_object_signal_emit(sd->entry_edje, "elm,action,focus", "elm"); if (sd->scroll) @@ -1794,16 +1785,7 @@ _elm_entry_focus_update(Eo *obj, Elm_Entry_Data *sd) if (top && efl_isa(top, EFL_UI_WIN_CLASS)) top_is_win = EINA_TRUE; - //TIZEN_ONLY(20180607): Restore legacy focus - Eina_Bool focused = EINA_FALSE; - if (elm_widget_is_legacy(obj)) - focused = elm_widget_focus_get(obj); - else - focused = efl_ui_focus_object_focus_get(obj); - - if (focused && sd->editable) - //if (efl_ui_focus_object_focus_get(obj) && sd->editable) - // + if (efl_ui_focus_object_focus_get(obj) && sd->editable) { evas_object_focus_set(sd->entry_edje, EINA_TRUE); edje_object_signal_emit(sd->entry_edje, "elm,action,focus", "elm"); @@ -3479,15 +3461,7 @@ _entry_cursor_changed_signal_cb(void *data, (sd->entry_edje, "elm.text", EDJE_CURSOR_MAIN); sd->cur_changed = EINA_TRUE; - //TIZEN_ONLY(20180607): Restore legacy focus - Eina_Bool focused; - if (elm_widget_is_legacy(data)) - focused = elm_widget_focus_get(data); - else - focused = efl_ui_focus_object_focus_get(data); - if (focused) - //if (efl_ui_focus_object_focus_get(data)) - // + if (efl_ui_focus_object_focus_get(data)) edje_object_signal_emit(sd->entry_edje, "elm,action,show,cursor", "elm"); _cursor_geometry_recalc(data); @@ -6023,16 +5997,13 @@ _elm_entry_editable_set(Eo *obj, Elm_Entry_Data *sd, Eina_Bool editable) efl_ui_widget_theme_apply(obj); _elm_entry_focus_update(obj, sd); - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) - // - { - //legacy focus event emission - if (efl_ui_focus_object_focus_get(obj)) - evas_object_smart_callback_call(obj, "focused", NULL); - else - evas_object_smart_callback_call(obj, "unfocused", NULL); - } + /* TIZEN_ONLY(20180607): Restore legacy focus + //legacy focus event emission + if (efl_ui_focus_object_focus_get(obj)) + evas_object_smart_callback_call(obj, "focused", NULL); + else + evas_object_smart_callback_call(obj, "unfocused", NULL); + */ elm_drop_target_del(obj, sd->drop_format, _dnd_enter_cb, NULL, _dnd_leave_cb, NULL, diff --git a/src/lib/elementary/elm_focus_legacy.c b/src/lib/elementary/elm_focus_legacy.c index aa87424..2479b01 100644 --- a/src/lib/elementary/elm_focus_legacy.c +++ b/src/lib/elementary/elm_focus_legacy.c @@ -238,13 +238,14 @@ EAPI void elm_object_focus_next(Evas_Object *obj, Elm_Focus_Direction dir) { + //TIZEN_ONLY(20180607): Restore legacy focus + /* Eina_Bool legacy_focus_move = EINA_FALSE; Efl_Ui_Widget *o = NULL, *top; Efl_Ui_Focus_Object *logical; Efl_Ui_Focus_Manager *manager_top; API_ENTRY() - //TIZEN_ONLY(20180607): Restore legacy focus - /* + top = elm_object_top_widget_get(obj); EINA_SAFETY_ON_FALSE_RETURN(efl_isa(top, EFL_UI_WIN_CLASS)); @@ -312,6 +313,7 @@ elm_object_focus_next(Evas_Object *obj, } } */ + EINA_SAFETY_ON_NULL_RETURN(obj); efl_ui_widget_focus_cycle(obj, dir); // } @@ -320,10 +322,10 @@ EAPI Evas_Object * elm_object_focus_next_object_get(const Evas_Object *obj, Elm_Focus_Direction dir) { - Efl_Ui_Widget *top = elm_object_top_widget_get(obj); - API_ENTRY_VAL(NULL) //TIZEN_ONLY(20180607): Restore legacy focus /* + Efl_Ui_Widget *top = elm_object_top_widget_get(obj); + API_ENTRY_VAL(NULL) #define MAP(direction, field) if ((Efl_Ui_Focus_Direction)dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) return pd->legacy_focus.field; MAPPING() @@ -331,6 +333,7 @@ elm_object_focus_next_object_get(const Evas_Object *obj, return efl_ui_focus_manager_request_move(efl_ui_focus_util_active_manager(top), dir, NULL, EINA_FALSE); */ + EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL); return efl_ui_widget_focus_next_object_get(obj, dir); // } @@ -397,18 +400,18 @@ elm_object_focused_object_get(const Evas_Object *obj) EAPI Eina_Bool elm_object_focus_get(const Evas_Object *obj) { - //TIZEN_ONLY(20181205): disable focus manager stuff - //API_ENTRY_VAL(EINA_FALSE) + /* TIZEN_ONLY(20180607): Restore legacy focus + API_ENTRY_VAL(EINA_FALSE) if (!elm_widget_is(obj)) return evas_object_focus_get(obj); - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - return elm_widget_focus_get(obj); - // - return _elm_widget_top_win_focused_get(obj) && (efl_ui_focus_object_child_focus_get(obj) | efl_ui_focus_object_focus_get(obj)); + */ + + EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE); + return elm_widget_focus_get(obj); + // } EAPI void @@ -427,24 +430,21 @@ elm_object_focus_set(Evas_Object *obj, } else if (elm_widget_is(obj)) { - if (elm_widget_is_legacy(obj)) - { - if (focus == elm_widget_focus_get(obj)) return; - - if (focus) - efl_ui_widget_focus_cycle(obj, ELM_FOCUS_NEXT); - else - efl_ui_widget_focused_object_clear(obj); - return; - } + if (focus == elm_widget_focus_get(obj)) return; if (focus) + efl_ui_widget_focus_cycle(obj, ELM_FOCUS_NEXT); + else + efl_ui_widget_focused_object_clear(obj); + /* TIZEN_ONLY(20191021): disable focus manager + if (focus) efl_ui_focus_util_focus(obj); else { if (efl_ui_focus_manager_focus_get(efl_ui_focus_object_focus_manager_get(obj)) == obj) efl_ui_focus_manager_pop_history_stack(efl_ui_focus_object_focus_manager_get(obj)); } + */ } else { @@ -484,8 +484,7 @@ void legacy_efl_ui_focus_manager_widget_legacy_signals(Efl_Ui_Focus_Manager *manager, Efl_Ui_Focus_Manager *emittee) { //TIZEN_ONLY(20180607): disable focus manager stuff - if (elm_widget_is_legacy(manager)) - return; + return; // Legacy_Manager_Focus_State *state = calloc(1, sizeof(Legacy_Manager_Focus_State)); @@ -533,8 +532,7 @@ void legacy_child_focus_handle(Efl_Ui_Focus_Object *object) { //TIZEN_ONLY(20180607): disable focus manager stuff - if (elm_widget_is_legacy(object)) - return; + return; // Legacy_Object_Focus_State *state = calloc(1, sizeof(Legacy_Object_Focus_State)); @@ -557,8 +555,7 @@ void legacy_object_focus_handle(Efl_Ui_Focus_Object *object) { //TIZEN_ONLY(20180607): disable focus manager stuff - if (elm_widget_is_legacy(object)) - return; + return; // efl_event_callback_add(object, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _focus_event_changed, NULL); diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index ddbbd4b..3e7a00c 100755 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -134,6 +134,10 @@ static const Elm_Action key_actions[] = { static void _flush_focus_on_realization(Eo *widget, Elm_Gen_Item *it) { + //TIZEN_ONLY(20191021): disable focus manager + return; + // + ELM_GENGRID_DATA_GET_OR_RETURN(widget, sd); if (sd->focus_on_realization == it) @@ -2269,10 +2273,7 @@ _item_place(Elm_Gen_Item *it, _elm_gengrid_item_index_update(it); efl_event_callback_legacy_call (WIDGET(it), ELM_GENGRID_EVENT_REALIZED, EO_OBJ(it)); - //TIZEN_ONLY(20181205): disable focus manager stuff - //_flush_focus_on_realization(WIDGET(it), it); - if (!elm_widget_is_legacy(WIDGET(it))) - _flush_focus_on_realization(WIDGET(it), it); + _flush_focus_on_realization(WIDGET(it), it); } if (it->parent) { @@ -2538,10 +2539,7 @@ _group_item_place(Elm_Gengrid_Pan_Data *psd) _elm_gengrid_item_index_update(it); efl_event_callback_legacy_call (WIDGET(it), ELM_GENGRID_EVENT_REALIZED, EO_OBJ(it)); - //TIZEN_ONLY(20181205): disable focus manager stuff - //_flush_focus_on_realization(WIDGET(it), it); - if (!elm_widget_is_legacy(WIDGET(it))) - _flush_focus_on_realization(WIDGET(it), it); + _flush_focus_on_realization(WIDGET(it), it); } //TIZEN_ONLY(20170131): Group on Top Feature is not tizen UI. /* @@ -4181,54 +4179,6 @@ _key_action_move(Evas_Object *obj, const char *params) y += page_y; } } - - //TIZEN_ONLY(20180607): Restore legacy focus - else if (!elm_widget_is_legacy(obj)) - { - if (_get_direction(dir, &direction)) - { - if (mirrored) - { - if (direction == ELM_FOCUS_RIGHT || direction == ELM_FOCUS_LEFT) - direction = _direction_mirror(direction); - } - if (sd->reorder_mode) - { - return _reorder_helper(sd, direction); - } - else - { - Evas_Object *next = NULL; - next = elm_object_item_focus_next_object_get(sd->focused_item, - ELM_FOCUS_LEFT); - if (next) - { - elm_object_focus_set(next, EINA_TRUE); - return EINA_TRUE; - } - } - return _focus_move(obj, sd, direction); - - } - else if (_get_multi_direction(dir, &direction)) - { - if (mirrored) - { - if (direction == ELM_FOCUS_RIGHT || direction == ELM_FOCUS_LEFT) - direction = _direction_mirror(direction); - } - if (direction == ELM_FOCUS_LEFT || direction == ELM_FOCUS_RIGHT) - { - if (_elm_gengrid_item_edge_check(sd->focused_item, direction)) - return EINA_FALSE; - } - if (_item_multi_select(sd, direction)) return EINA_TRUE; - else if (_selection_single_move(obj, sd, direction)) return EINA_TRUE; - else return EINA_FALSE; - } - else - return EINA_FALSE; - } else if ((!strcmp(dir, "left") && !mirrored) || (!strcmp(dir, "right") && mirrored)) { @@ -4760,9 +4710,6 @@ _elm_gengrid_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Gengrid_Data *sd) int_ret = efl_ui_focus_object_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; - //Fallback Legacy Focus - if (!elm_widget_is_legacy(obj)) return EINA_TRUE; - if (elm_widget_focus_get(obj) && (sd->selected) && (!sd->last_selected_item)) { @@ -4808,9 +4755,7 @@ _elm_gengrid_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Gengrid_Data *sd) EOLIAN static Eina_Bool _elm_gengrid_efl_ui_widget_focus_next_manager_is(Eo *obj, Elm_Gengrid_Data *_pd EINA_UNUSED) { - //Fallback Legacy Focus - if (elm_widget_is_legacy(obj)) return _elm_gengrid_smart_focus_next_enable; - else return efl_ui_widget_focus_next_manager_is(efl_super(obj, MY_CLASS)); + return _elm_gengrid_smart_focus_next_enable; } EOLIAN static Eina_Bool @@ -4819,10 +4764,6 @@ _elm_gengrid_efl_ui_widget_focus_next(Eo *obj, Elm_Gengrid_Data *sd, Efl_Ui_Focu Eina_List *items = NULL; Elm_Gen_Item *it; - //Fallback Legacy Focus - if (!elm_widget_is_legacy(obj)) - return efl_ui_widget_focus_next(efl_super(obj, MY_CLASS), dir, next, next_item); - EINA_INLIST_FOREACH(sd->items, it) { if (it->realized) @@ -4836,10 +4777,7 @@ _elm_gengrid_efl_ui_widget_focus_next(Eo *obj, Elm_Gengrid_Data *sd, Efl_Ui_Focu EOLIAN static Eina_Bool _elm_gengrid_efl_ui_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *_pd EINA_UNUSED) { - //Fallback Legacy Focus - if (!elm_widget_is_legacy(obj)) - return efl_ui_widget_focus_direction_manager_is(efl_super(obj, MY_CLASS)); - else return EINA_TRUE; + return EINA_TRUE; } EOLIAN static Eina_Bool @@ -4850,10 +4788,6 @@ _elm_gengrid_efl_ui_widget_focus_direction(Eo *obj, Elm_Gengrid_Data *sd EINA_UN Eina_Bool ret = EINA_FALSE; double c_weight = 0.0; - //Fallback Legacy Focus - if (!elm_widget_is_legacy(obj)) - return efl_ui_widget_focus_direction(efl_super(obj, MY_CLASS), base, degree, direction, direction_item, weight); - items = elm_gengrid_realized_items_get(obj); eo_item = elm_object_focused_item_get(base); if (eo_item) @@ -5178,21 +5112,7 @@ _elm_gengrid_item_elm_widget_item_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Ei sd->focus_on_realization = it; } */ - if (elm_widget_is_legacy(obj)) - _elm_gengrid_item_focused(eo_it); - else - { - if (it->realized) - { - _elm_gengrid_item_focused(eo_it); - sd->focus_on_realization = NULL; - efl_ui_focus_manager_focus_set(obj, eo_it); - } - else - { - sd->focus_on_realization = it; - } - } + _elm_gengrid_item_focused(eo_it); } } else @@ -5637,10 +5557,6 @@ _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Gengrid_Data { Elm_Object_Item *eo_it = NULL; - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) return; - // - if (!pd->items) { efl_ui_focus_manager_setup_on_first_touch(efl_super(obj, MY_CLASS), direction, entry); @@ -5788,16 +5704,9 @@ _elm_gengrid_efl_object_constructor(Eo *obj, Elm_Gengrid_Data *sd) obj = efl_constructor(efl_super(obj, MY_CLASS)); - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) - // - { - sd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_GEN_CLASS, obj, - efl_ui_focus_parent_provider_gen_container_set(efl_added, obj), - efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map)); - - efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _gengrid_element_focused, obj); - } + sd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_GEN_CLASS, obj, + efl_ui_focus_parent_provider_gen_container_set(efl_added, obj), + efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map)); sd->obj = obj; @@ -5805,6 +5714,7 @@ _elm_gengrid_efl_object_constructor(Eo *obj, Elm_Gengrid_Data *sd) evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_TREE_TABLE); + efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _gengrid_element_focused, obj); return obj; } @@ -7524,10 +7434,6 @@ _elm_gengrid_efl_ui_focus_object_setup_order(Eo *obj, Elm_Gengrid_Data *pd) Elm_Gen_Item *item; Eina_List *order = NULL; - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) return; - // - if (!pd->order_dirty) return; pd->order_dirty = EINA_FALSE; @@ -7549,10 +7455,6 @@ _elm_gengrid_efl_ui_focus_object_setup_order(Eo *obj, Elm_Gengrid_Data *pd) EOLIAN static Eina_Bool _elm_gengrid_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Gengrid_Data *pd EINA_UNUSED, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect EINA_UNUSED) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) return EINA_FALSE; - // - return efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, obj); } @@ -7562,10 +7464,6 @@ _elm_gengrid_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen Eina_List *n; Efl_Ui_Widget *wid; - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) return; - // - EINA_LIST_FOREACH(pd->contents, n, wid) { if (efl_isa(wid, EFL_UI_WIDGET_CLASS)) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index e2845f5..1c9ac80 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -487,9 +487,8 @@ _item_content_realize(Elm_Gen_Item *it, if (content != old) { //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(sd->obj)) + //eina_hash_add(sd->content_item_map, &content, it->base->eo_obj); // - eina_hash_add(sd->content_item_map, &content, it->base->eo_obj); // FIXME: Genlist item doesn't update its size when the size of // content is changed, so deferred calculation for content should // be performed before realization. @@ -532,9 +531,8 @@ out: *contents = eina_list_remove(*contents, old); evas_object_del(old); //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(sd->obj)) + //eina_hash_del_by_key(sd->content_item_map, &old); // - eina_hash_del_by_key(sd->content_item_map, &old); } } } @@ -1812,11 +1810,8 @@ _content_cache_add(Elm_Gen_Item *it, Eina_List **cache) { *cache = eina_list_append(*cache, content); //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(pd->obj)) - { - eina_hash_del_by_key(pd->content_item_map, &content); - elm_widget_tree_unfocusable_set(content, EINA_TRUE); - } + //eina_hash_del_by_key(pd->content_item_map, &content); + //elm_widget_tree_unfocusable_set(content, EINA_TRUE); // } @@ -3680,7 +3675,6 @@ _elm_genlist_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Genlist_Data *sd) Eina_Bool int_ret = EINA_FALSE; Elm_Object_Item *eo_it = NULL; Eina_Bool is_sel = EINA_FALSE; - Eina_Bool focused; int_ret = efl_ui_focus_object_on_focus_update(efl_super(obj, MY_CLASS)); if (!int_ret) return EINA_FALSE; @@ -3692,21 +3686,14 @@ _elm_genlist_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Genlist_Data *sd) sd->last_selected_item = eina_list_data_get(sd->selected); } */ - if (elm_widget_is_legacy(obj)) - focused = elm_widget_focus_get(obj); - else - focused = efl_ui_focus_object_focus_get(obj); - if (focused && (sd->items) && (sd->selected) && + if (elm_widget_focus_get(obj) && (sd->items) && (sd->selected) && (!sd->last_selected_item)) { sd->last_selected_item = eina_list_data_get(sd->selected); } - if (!elm_widget_is_legacy(obj)) - return EINA_TRUE; - - if (focused && !sd->mouse_down) + if (elm_widget_focus_get(obj) && !sd->mouse_down) { if (sd->last_focused_item) eo_it = sd->last_focused_item; @@ -3736,9 +3723,6 @@ _elm_genlist_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Genlist_Data *sd) else elm_object_item_focus_set(eo_it, EINA_TRUE); _elm_widget_focus_highlight_start(obj); - //set it again in the manager, there might be the case that the manager focus history and internal item foused logic are in different states - if (!elm_widget_is_legacy(obj) && efl_ui_focus_manager_request_subchild(obj, eo_it)) - efl_ui_focus_manager_focus_set(obj, eo_it); } } } @@ -3761,19 +3745,13 @@ static Eina_Bool _elm_genlist_smart_focus_next_enable = EINA_FALSE; EOLIAN static Eina_Bool _elm_genlist_efl_ui_widget_focus_next_manager_is(Eo *obj, Elm_Genlist_Data *_pd EINA_UNUSED) { - //Fallback Legacy Focus - if (elm_widget_is_legacy(obj)) - return _elm_genlist_smart_focus_next_enable; - else return efl_ui_widget_focus_next_manager_is(efl_super(obj, ELM_GENLIST_CLASS)); + return _elm_genlist_smart_focus_next_enable; } EOLIAN static Eina_Bool _elm_genlist_efl_ui_widget_focus_direction_manager_is(Eo *obj EINA_UNUSED, Elm_Genlist_Data *_pd EINA_UNUSED) { - //Fallback Legacy Focus - if (elm_widget_is_legacy(obj)) - return EINA_FALSE; - else return efl_ui_widget_focus_direction_manager_is(efl_super(obj, ELM_GENLIST_CLASS)); + return EINA_FALSE; } EOLIAN static Eina_Bool @@ -3786,10 +3764,6 @@ _elm_genlist_efl_ui_widget_focus_next(Eo *obj, Elm_Genlist_Data *sd, Efl_Ui_Focu Eina_Bool done = EINA_FALSE; int ret; - //Fallback Legacy Focus - if (!elm_widget_is_legacy(obj)) - return efl_ui_widget_focus_next(efl_super(obj, ELM_GENLIST_CLASS), dir, next, next_item); - evas_object_geometry_get(sd->obj, &sx, &sy, &sw, &sh); EINA_INLIST_FOREACH(sd->blocks, itb) @@ -6384,19 +6358,10 @@ _elm_genlist_efl_object_constructor(Eo *obj, Elm_Genlist_Data *sd) legacy_efl_ui_focus_manager_widget_legacy_signals(obj, obj); obj = efl_constructor(efl_super(obj, MY_CLASS)); - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) - // - { - sd->content_item_map = eina_hash_pointer_new(NULL); - sd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_GEN_CLASS, obj, - efl_ui_focus_parent_provider_gen_container_set(efl_added, obj), - efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map)); - - efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE); - - efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _genlist_element_focused, obj); - } + sd->content_item_map = eina_hash_pointer_new(NULL); + sd->provider = efl_add(EFL_UI_FOCUS_PARENT_PROVIDER_GEN_CLASS, obj, + efl_ui_focus_parent_provider_gen_container_set(efl_added, obj), + efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map)); sd->obj = obj; @@ -6404,6 +6369,8 @@ _elm_genlist_efl_object_constructor(Eo *obj, Elm_Genlist_Data *sd) evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_LIST); + efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _genlist_element_focused, obj); + return obj; } @@ -6537,24 +6504,20 @@ _item_select(Elm_Gen_Item *it) if (!(sd->focus_on_selection_enabled || _elm_config->item_select_on_focus_disable)) { //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) - { - Evas_Object *swallow_obj; - Eina_List *l; + //efl_ui_focus_manager_focus_set(obj, it->base->eo_obj); + Evas_Object *swallow_obj; + Eina_List *l; - EINA_LIST_FOREACH(it->contents, l, swallow_obj) + EINA_LIST_FOREACH(it->contents, l, swallow_obj) + { + if (elm_widget_is(swallow_obj) && elm_object_focus_get(swallow_obj)) { - if (elm_widget_is(swallow_obj) && elm_object_focus_get(swallow_obj)) - { - elm_object_focus_set(obj, EINA_FALSE); - elm_object_focus_set(obj, EINA_TRUE); - break; - } + elm_object_focus_set(obj, EINA_FALSE); + elm_object_focus_set(obj, EINA_TRUE); + break; } - goto item_deleted; } // - efl_ui_focus_manager_focus_set(obj, it->base->eo_obj); } item_deleted: @@ -6730,15 +6693,7 @@ _elm_genlist_item_elm_widget_item_item_focus_set(Eo *eo_it, Elm_Gen_Item *it, Ei } else { - //TIZEN_ONLY(20180607): Restore legacy focus - Eina_Bool focused; - if (elm_widget_is_legacy(obj)) - focused = elm_widget_focus_get(obj); - else - focused = efl_ui_focus_object_focus_get(obj); - if (!focused) - //if (!efl_ui_focus_object_focus_get(obj)) - // + if (!efl_ui_focus_object_focus_get(obj)) return; _elm_genlist_item_unfocused(eo_it); } @@ -9383,10 +9338,8 @@ EOLIAN static Efl_Object* _elm_genlist_efl_object_provider_find(const Eo *obj, Elm_Genlist_Data *pd, const Efl_Object *klass) { //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj) && (klass == EFL_UI_FOCUS_PARENT_PROVIDER_INTERFACE)) //if (klass == EFL_UI_FOCUS_PARENT_PROVIDER_INTERFACE) - // - return pd->provider; + // return pd->provider; return efl_provider_find(efl_super(obj, ELM_GENLIST_CLASS), klass); } @@ -9396,10 +9349,6 @@ _elm_genlist_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen Eina_List *n; Efl_Ui_Widget *wid; - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) return; - // - EINA_LIST_FOREACH(pd->contents, n, wid) { if (efl_isa(wid, EFL_UI_WIDGET_CLASS)) @@ -9413,10 +9362,6 @@ _elm_genlist_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen EOLIAN static Eina_Bool _elm_genlist_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Genlist_Data *pd EINA_UNUSED, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect EINA_UNUSED) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) return EINA_FALSE; - // - return efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, obj); } diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index cab7dc2..2925045 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -5594,9 +5594,6 @@ _filter_cb(const void *iterator EINA_UNUSED, void *data, void *fdata) EOLIAN static Eina_Iterator* _elm_interface_scrollable_efl_ui_focus_manager_border_elements_get(const Eo *obj, Elm_Scrollable_Smart_Interface_Data *pd EINA_UNUSED) { - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) return NULL; - // Eina_Iterator *border_elements; Eina_Rectangle *rect = calloc(1, sizeof(Eina_Rectangle)); diff --git a/src/lib/elementary/elm_interface_scrollable.eo b/src/lib/elementary/elm_interface_scrollable.eo index 7a1f55b..c82748d 100644 --- a/src/lib/elementary/elm_interface_scrollable.eo +++ b/src/lib/elementary/elm_interface_scrollable.eo @@ -687,8 +687,8 @@ mixin @beta Elm.Interface_Scrollable requires Efl.Ui.Widget extends Efl.Ui.Focus implements { class.constructor; Efl.Object.constructor; - Efl.Ui.Focus.Manager.border_elements { get; } - Efl.Ui.Widget_Focus_Manager.focus_manager_create; + @empty Efl.Ui.Focus.Manager.border_elements { get; } + @empty Efl.Ui.Widget_Focus_Manager.focus_manager_create; Efl.Ui.I18n.mirrored { set; } } events { diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index a6f0bf5..b3ac9aa 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -1345,14 +1345,9 @@ _elm_list_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_List_Data *sd) if (!_elm_config->item_select_on_focus_disable && is_sel) elm_list_item_selected_set(EO_OBJ(it), EINA_TRUE); else - { - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(WIDGET(it))) - elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE); - else - // - _elm_list_item_focused(EO_OBJ(it)); - } + //TIZEN_ONLY(20180607): Restore legacy focus + //_elm_list_item_focused(EO_OBJ(it)); + elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE); } } } @@ -2396,9 +2391,8 @@ _item_new(Evas_Object *obj, (it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb, obj); //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) + //elm_widget_tree_unfocusable_set(it->icon, EINA_TRUE); // - elm_widget_tree_unfocusable_set(it->icon, EINA_TRUE); } if (it->end) { @@ -2407,9 +2401,8 @@ _item_new(Evas_Object *obj, (it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb, obj); //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) + //elm_widget_tree_unfocusable_set(it->end, EINA_TRUE); // - elm_widget_tree_unfocusable_set(it->end, EINA_TRUE); } if (_elm_atspi_enabled()) diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index 04b087d..0452de8 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -1089,6 +1089,9 @@ int tizen_util_probe_profile_wearable(); #define TIZEN_PROFILE_WEARABLE (__builtin_expect(_tizen_profile_wearable != -1, 1)?_tizen_profile_wearable:tizen_util_probe_profile_wearable()) // +//TIZEN_ONLY(20191021): disable focus manager +#define efl_ui_focus_object_focus_get elm_widget_focus_get + /*********************************************************************************** * TIZEN_ONLY_FEATURE: apply Tizen's color_class features. * ***********************************************************************************/ diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c index 0ab9921..101ac5b 100644 --- a/src/lib/elementary/elm_scroller.c +++ b/src/lib/elementary/elm_scroller.c @@ -1164,12 +1164,8 @@ _elm_scroller_efl_object_constructor(Eo *obj, Elm_Scroller_Data *_pd EINA_UNUSED efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY); evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_SCROLL_PANE); - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) - { - efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _focused_element, obj); - legacy_efl_ui_focus_manager_widget_legacy_signals(obj, obj); - } + efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _focused_element, obj); + legacy_efl_ui_focus_manager_widget_legacy_signals(obj, obj); return obj; } diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c index 75d07a1..9387250 100644 --- a/src/lib/elementary/elm_spinner.c +++ b/src/lib/elementary/elm_spinner.c @@ -438,13 +438,11 @@ _entry_value_apply(Evas_Object *obj) if (!sd->entry_visible) return; //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(obj)) evas_object_smart_callback_del_full(sd->ent, "unfocused", _entry_unfocused_cb, obj); - else - efl_event_callback_del(sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, - _entry_focus_change, obj); // + efl_event_callback_del + (sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _entry_focus_change, obj); _entry_hide(obj); str = elm_object_text_get(sd->ent); if (!str) return; @@ -738,24 +736,18 @@ _toggle_entry(Evas_Object *obj) _entry_show(sd); elm_entry_select_all(sd->ent); //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(sd->ent)) - elm_widget_focus_set(sd->ent, EINA_TRUE); + elm_widget_focus_set(sd->ent, EINA_TRUE); // sd->entry_visible = EINA_TRUE; } + efl_event_callback_add + (sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _entry_focus_change, obj); //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(sd->ent)) - evas_object_smart_callback_add(sd->ent, "unfocused", _entry_unfocused_cb, obj); - else + evas_object_smart_callback_add(sd->ent, "unfocused", _entry_unfocused_cb, obj); // - efl_event_callback_add - (sd->ent, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, _entry_focus_change, obj); sd->entry_visible = EINA_TRUE; elm_layout_signal_emit(obj, "elm,state,entry,active", "elm"); evas_object_show(sd->ent); - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) - // { Eina_List *items = NULL; @@ -765,9 +757,8 @@ _toggle_entry(Evas_Object *obj) items = eina_list_append(items, sd->inc_button); efl_ui_focus_composition_elements_set(obj, items); - - efl_ui_focus_manager_focus_set(efl_ui_focus_object_focus_manager_get(obj), sd->ent); } + efl_ui_focus_manager_focus_set(efl_ui_focus_object_focus_manager_get(obj), sd->ent); } } @@ -1400,9 +1391,6 @@ _elm_spinner_efl_canvas_group_group_add(Eo *obj, Elm_Spinner_Data *priv) elm_layout_content_set(obj, "elm.swallow.dec_button", priv->dec_button); elm_widget_sub_object_add(obj, priv->dec_button); - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) - // { Eina_List *items = NULL; diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index e10c3eb..b99b142 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -824,16 +824,7 @@ _elm_toolbar_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Toolbar_Data *sd) if (!int_ret) return EINA_FALSE; if (!sd->items) return EINA_FALSE; - //TIZEN_ONLY(20180607): Restore legacy focus - Eina_Bool focused = EINA_FALSE; - if (elm_widget_is_legacy(obj)) - focused = elm_widget_focus_get(obj); - else - focused = efl_ui_focus_object_focus_get(obj); - - if (focused) - //if (efl_ui_focus_object_focus_get(obj)) - // + if (efl_ui_focus_object_focus_get(obj)) { evas_object_focus_set(wd->resize_obj, EINA_TRUE); if (sd->mouse_down) return EINA_TRUE; @@ -892,10 +883,10 @@ _elm_toolbar_item_elm_widget_item_item_focus_set(Eo *eo_it, Elm_Toolbar_Item_Dat if (eo_it) _elm_toolbar_item_unfocused(eo_it); } + //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) + //evas_object_focus_set(VIEW(it), focused); // - evas_object_focus_set(VIEW(it), focused); _elm_widget_item_highlight_in_theme(obj, EO_OBJ(it)); _elm_widget_highlight_in_theme_update(obj); diff --git a/src/lib/elementary/elm_widget_item_static_focus.c b/src/lib/elementary/elm_widget_item_static_focus.c index 2a7e3a0..f040cbc 100644 --- a/src/lib/elementary/elm_widget_item_static_focus.c +++ b/src/lib/elementary/elm_widget_item_static_focus.c @@ -84,10 +84,6 @@ _elm_widget_item_static_focus_efl_ui_focus_object_setup_order_non_recursive(Eo * Eo *logical_child; Elm_Widget_Item_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS); - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(wpd->widget)) return; - // - efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, MY_CLASS)); if (!pd->realized) @@ -148,10 +144,6 @@ _elm_widget_item_static_focus_efl_object_constructor(Eo *obj, Elm_Widget_Item_St Elm_Widget_Item_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS); Eo *ret = efl_constructor(efl_super(obj, MY_CLASS)); - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(wpd->widget)) return ret; - // - if (efl_isa(wpd->widget, ELM_GENLIST_CLASS)) { efl_event_callback_add(wpd->widget, ELM_GENLIST_EVENT_REALIZED, _list_realized_cb, obj); @@ -169,12 +161,6 @@ EOLIAN static void _elm_widget_item_static_focus_efl_object_destructor(Eo *obj, Elm_Widget_Item_Static_Focus_Data *pd EINA_UNUSED) { Elm_Widget_Item_Data *wpd = efl_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS); - - //TIZEN_ONLY(20180607): Restore legacy focus - if (elm_widget_is_legacy(wpd->widget)) - return efl_destructor(efl_super(obj, MY_CLASS)); - // - if (efl_isa(wpd->widget, ELM_GENLIST_CLASS)) { efl_event_callback_del(wpd->widget, ELM_GENLIST_EVENT_REALIZED, _list_realized_cb, obj); diff --git a/src/lib/elementary_tizen/elm_genlist.c b/src/lib/elementary_tizen/elm_genlist.c index 09b9fd5..c543894 100644 --- a/src/lib/elementary_tizen/elm_genlist.c +++ b/src/lib/elementary_tizen/elm_genlist.c @@ -9704,25 +9704,13 @@ _elm_genlist_efl_object_provider_find(const Eo *obj, Elm_Genlist_Data *pd, const EOLIAN static void _elm_genlist_item_efl_ui_focus_object_setup_order_non_recursive(Eo *obj, Elm_Gen_Item *pd) { - Eina_List *n; - Efl_Ui_Widget*wid; - - if (elm_widget_is_legacy(WIDGET(pd))) return; -// _item_realize(pd, EINA_FALSE); - - EINA_LIST_FOREACH(pd->contents, n, wid) - { - if (efl_isa(wid, EFL_UI_WIDGET_CLASS)) - _elm_widget_full_eval(wid); - } - - efl_ui_focus_object_setup_order_non_recursive(efl_super(obj, ELM_GENLIST_ITEM_CLASS)); + return; } EOLIAN static Eina_Bool _elm_genlist_efl_ui_widget_focus_state_apply(Eo *obj, Elm_Genlist_Data *pd EINA_UNUSED, Efl_Ui_Widget_Focus_State current_state, Efl_Ui_Widget_Focus_State *configured_state, Efl_Ui_Widget *redirect EINA_UNUSED) { - return efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, obj); + return EINA_FALSE; } // TIZEN only (20150914) : Accessibility: updated highlight change during genlist and list scroll