aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/elm_widget.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2017-10-17 15:57:37 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2017-10-17 17:31:23 +0200
commit881815ec57a80cef237e2546511e08000e948036 (patch)
tree92d570447e9492ff6603d3e02bfbc6259b00c9a3 /src/lib/elementary/elm_widget.c
parentelm_widget: move evaluation for registeration of widget (diff)
downloadefl-881815ec57a80cef237e2546511e08000e948036.tar.gz
elm_widget: only register if you have to
first step into the direction of making that more secure
Diffstat (limited to 'src/lib/elementary/elm_widget.c')
-rw-r--r--src/lib/elementary/elm_widget.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 08c3045713..29f47adb28 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -453,14 +453,19 @@ _focus_state_eval(Eo *obj, Elm_Widget_Smart_Data *pd, Eina_Bool should, Eina_Boo
}
static Efl_Ui_Focus_Object*
-_logical_parent_eval(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd)
+_logical_parent_eval(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *pd, Eina_Bool should)
{
Elm_Widget *parent;
Efl_Ui_Focus_Parent_Provider *provider;
- provider = efl_provider_find(obj, EFL_UI_FOCUS_PARENT_PROVIDER_INTERFACE);
+ if (should)
+ {
+ provider = efl_provider_find(obj, EFL_UI_FOCUS_PARENT_PROVIDER_INTERFACE);
+ parent = efl_ui_focus_parent_provider_find_logical_parent(provider, obj);
+ }
+ else
+ parent = NULL;
- parent = efl_ui_focus_parent_provider_find_logical_parent(provider, obj);
if (pd->logical.parent != parent)
{
@@ -510,9 +515,10 @@ _full_eval(Eo *obj, Elm_Widget_Smart_Data *pd)
Efl_Ui_Focus_Object *old_registered_parent, *old_registered_manager;
Eina_Bool should, want_full;
+
_eval_registration_candidate(obj, pd, &should, &want_full);
- old_parent = _logical_parent_eval(obj, pd);
+ old_parent = _logical_parent_eval(obj, pd, should);
if (efl_isa(old_parent, ELM_WIDGET_CLASS))
{