forked from enlightenment/efl
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
|
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;
|
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)
|
if (pd->last_focused_item)
|
||||||
eo_it = pd->last_focused_item;
|
eo_it = pd->last_focused_item;
|
||||||
else if (pd->last_selected_item)
|
else if (pd->last_selected_item)
|
||||||
|
@ -4230,6 +4236,7 @@ _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Gengrid_Data
|
||||||
//Just set evas focus on the gengrid itself, events will pass on and some element will be taken
|
//Just set evas focus on the gengrid itself, events will pass on and some element will be taken
|
||||||
evas_object_focus_set(obj, EINA_TRUE);
|
evas_object_focus_set(obj, EINA_TRUE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -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;
|
Elm_Object_Item *eo_it = NULL;
|
||||||
Eina_Bool is_sel = EINA_FALSE;
|
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)
|
if (sd->last_focused_item)
|
||||||
eo_it = sd->last_focused_item;
|
eo_it = sd->last_focused_item;
|
||||||
else if (sd->last_selected_item)
|
else if (sd->last_selected_item)
|
||||||
|
@ -3434,6 +3440,7 @@ _elm_genlist_efl_ui_focus_manager_setup_on_first_touch(Eo *obj, Elm_Genlist_Data
|
||||||
//Just set evas focus on the genlist itself, events will pass on and a other element will be taken
|
//Just set evas focus on the genlist itself, events will pass on and a other element will be taken
|
||||||
evas_object_focus_set(obj, EINA_TRUE);
|
evas_object_focus_set(obj, EINA_TRUE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
|
@ -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);
|
Efl_Ui_Widget *focused = efl_ui_focus_manager_focus_get(ev->object);
|
||||||
Elm_Widget_Item *item;
|
Elm_Widget_Item *item;
|
||||||
|
|
||||||
if (!focused) return;
|
if (!focused || focused == data) return;
|
||||||
|
|
||||||
item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, focused);
|
item = efl_ui_focus_parent_provider_gen_item_fetch(pd->provider, focused);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue