elm_gen****: ensure that no focus item is handled correctly
This ensures that on first touch the root dummy element is focused correctly. fix T7203 Differential Revision: https://phab.enlightenment.org/D7231
This commit is contained in:
parent
c0e52526c6
commit
edf1fbea20
|
@ -4195,10 +4195,16 @@ elm_gengrid_add(Evas_Object *parent)
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_elm_gengrid_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Focus_Direction direction, Efl_Ui_Focus_Object *entry EINA_UNUSED)
|
||||
_elm_gengrid_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Gengrid_Data *pd, Efl_Ui_Focus_Direction direction, Efl_Ui_Focus_Object *entry)
|
||||
{
|
||||
Elm_Object_Item *eo_it = NULL;
|
||||
|
||||
if (!pd->items)
|
||||
{
|
||||
efl_ui_focus_manager_setup_on_first_touch(efl_super(obj, MY_CLASS), direction, entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pd->last_focused_item)
|
||||
eo_it = pd->last_focused_item;
|
||||
else if (pd->last_selected_item)
|
||||
|
@ -4231,6 +4237,7 @@ _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Gengrid_Data
|
|||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_gengrid_element_focused(void *data, const Efl_Event *ev)
|
||||
|
|
|
@ -3396,6 +3396,12 @@ _elm_genlist_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Genlist_Data
|
|||
Elm_Object_Item *eo_it = NULL;
|
||||
Eina_Bool is_sel = EINA_FALSE;
|
||||
|
||||
if (!sd->items)
|
||||
{
|
||||
efl_ui_focus_manager_setup_on_first_touch(efl_super(obj, MY_CLASS), direction, entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sd->last_focused_item)
|
||||
eo_it = sd->last_focused_item;
|
||||
else if (sd->last_selected_item)
|
||||
|
@ -3435,6 +3441,7 @@ _elm_genlist_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Genlist_Data
|
|||
evas_object_focus_set(obj, EINA_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_genlist_efl_ui_focus_object_on_focus_update(Eo *obj, Elm_Genlist_Data *sd)
|
||||
|
@ -5900,7 +5907,7 @@ _genlist_element_focused(void *data, const Efl_Event *ev)
|
|||
Efl_Ui_Widget *focused = efl_ui_focus_manager_focus_get(ev->object);
|
||||
Elm_Widget_Item *item;
|
||||
|
||||
if (!focused) return;
|
||||
if (!focused || focused == data) return;
|
||||
|
||||
item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, focused);
|
||||
|
||||
|
|
Loading…
Reference in New Issue