forked from enlightenment/efl
elm_focus_legacy: check if top is really a window
Summary: if not, things are going to fall apart, as manager_top then can be NULL or invalid. Top has to be a window element, if this is not the case, then the widget tree of the given widget is dangling somewhere in the void. Calculating the next object in there or even the active manager will result in errors, since the active manager is not really the active manager, but rather just a manager object somewhere in a danging widget subtree. Moving the focus into such a dangling widgettree might result in a stuck focus rect on this object, since the DFS of the focus manager implementation cannot backtrack anymore into the widgets that are still part of the widget graph. Depends on D6531 Reviewers: devilhorns, segfaultxavi, zmike Reviewed By: segfaultxavi Subscribers: cedric, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6532
This commit is contained in:
parent
fdc4925bf5
commit
df5c47a9eb
|
@ -184,6 +184,8 @@ elm_object_focus_next(Evas_Object *obj,
|
|||
API_ENTRY()
|
||||
|
||||
top = elm_object_top_widget_get(obj);
|
||||
EINA_SAFETY_ON_FALSE_RETURN(efl_isa(top, EFL_UI_WIN_CLASS));
|
||||
|
||||
manager_top = efl_ui_focus_util_active_manager(EFL_UI_FOCUS_UTIL_CLASS, obj);
|
||||
logical = efl_ui_focus_manager_focus_get(manager_top);
|
||||
|
||||
|
|
Loading…
Reference in New Issue