Reset the last_focused_item on _item_focus_set_hook.
This fixes the issue which sets the focus to the wrong item when the
focus is set by an API.
Reproduction step:
elementary_test -> genlist focus -> click an item (not the 2nd item) -> click "Focus 2nd
Item after 1.5 seconds" button.
Focus is not moved to the 2nd item.
@fix
if (focused)
{
+ sd->last_focused_item = it;
if (!elm_object_focus_get(obj))
elm_object_focus_set(obj, EINA_TRUE);
if (focused)
{
+ sd->last_focused_item = it;
if (!elm_object_focus_get(obj))
elm_object_focus_set(obj, EINA_TRUE);
if (focused)
{
+ sd->last_focused_item = it;
if (!elm_object_focus_get(obj))
elm_object_focus_set(obj, EINA_TRUE);
if (it != sd->focused_item)
if (focused)
{
+ sd->last_focused_item = it;
if (!elm_object_focus_get(obj))
elm_object_focus_set(obj, EINA_TRUE);
if (it != (Elm_Object_Item *)sd->focused_item)