summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-07-09 16:39:35 -0400
committerMike Blumenkrantz <zmike@samsung.com>2018-07-09 16:39:35 -0400
commitdf5c47a9eb9892780cf719ee4ba277fc19a5f03b (patch)
tree182aea64e7e7e940b51f20e031ae5fda5ca26202
parentfdc4925bf5fbcb171794a6b290d6ec40f95614b5 (diff)
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
-rw-r--r--src/lib/elementary/elm_focus_legacy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_focus_legacy.c b/src/lib/elementary/elm_focus_legacy.c
index 7c8bbe7917..33046deb6c 100644
--- a/src/lib/elementary/elm_focus_legacy.c
+++ b/src/lib/elementary/elm_focus_legacy.c
@@ -184,6 +184,8 @@ elm_object_focus_next(Evas_Object *obj,
184 API_ENTRY() 184 API_ENTRY()
185 185
186 top = elm_object_top_widget_get(obj); 186 top = elm_object_top_widget_get(obj);
187 EINA_SAFETY_ON_FALSE_RETURN(efl_isa(top, EFL_UI_WIN_CLASS));
188
187 manager_top = efl_ui_focus_util_active_manager(EFL_UI_FOCUS_UTIL_CLASS, obj); 189 manager_top = efl_ui_focus_util_active_manager(EFL_UI_FOCUS_UTIL_CLASS, obj);
188 logical = efl_ui_focus_manager_focus_get(manager_top); 190 logical = efl_ui_focus_manager_focus_get(manager_top);
189 191