elm_focus_legacy: fix focus moving for legacy

Summary:
elm_object_focus_next was not working correctly for objects where obj is
not the focused object.

fix T5940

Reviewers: devilhorns, segfaultxavi, zmike, stefan_schmidt

Reviewed By: segfaultxavi

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T5940

Differential Revision: https://phab.enlightenment.org/D6531
This commit is contained in:
Marcel Hollerbach 2018-07-09 16:39:30 -04:00 committed by Mike Blumenkrantz
parent ee8d06c806
commit fdc4925bf5
1 changed files with 2 additions and 1 deletions

View File

@ -190,8 +190,9 @@ elm_object_focus_next(Evas_Object *obj,
if (elm_widget_is(logical))
{
Efl_Ui_Focus_Object *legacy_target = NULL;
ELM_WIDGET_DATA_GET_OR_RETURN(logical, pd_logical);
#define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd->legacy_focus.field) legacy_target = pd->legacy_focus.field;
#define MAP(direction, field) if (dir == EFL_UI_FOCUS_DIRECTION_ ##direction && pd_logical->legacy_focus.field) legacy_target = pd_logical->legacy_focus.field;
MAPPING()
#undef MAP