From 1c7d36137d251bc447107f494b32dfcf6b5539e8 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Tue, 20 Nov 2018 10:49:40 -0600 Subject: [PATCH] elm: Re-order focus tests Placing the cheapest tests first can save on some heavy walks. Differential Revision: https://phab.enlightenment.org/D7313 Signed-off-by: Derek Foreman --- src/lib/elementary/efl_ui_widget.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/elementary/efl_ui_widget.c b/src/lib/elementary/efl_ui_widget.c index 67da61d..4519cb7 100644 --- a/src/lib/elementary/efl_ui_widget.c +++ b/src/lib/elementary/efl_ui_widget.c @@ -549,11 +549,11 @@ _eval_registration_candidate(Eo *obj, Elm_Widget_Smart_Data *pd, Eina_Bool *shou *should = *want_full = EINA_FALSE; //can focus can be overridden by the following properties - if (!efl_isa(elm_widget_top_get(obj), EFL_UI_WIN_CLASS) || - (!pd->parent_obj) || + if ((!pd->parent_obj) || + (!evas_object_visible_get(obj)) || + !efl_isa(elm_widget_top_get(obj), EFL_UI_WIN_CLASS) || (_tree_disabled_or_unfocusable(obj)) || - (_tree_custom_chain_missing(obj)) || - (!evas_object_visible_get(obj))) + (_tree_custom_chain_missing(obj))) return; if (pd->can_focus) -- 2.7.4