elm_widget_item_focus: use the correct parent

You need to use the parent here, otherwise the adapter will stay alive
for too long.
This commit is contained in:
Marcel Hollerbach 2018-01-04 17:18:21 +00:00
parent 76d8ff590a
commit c26e759b9e
1 changed files with 3 additions and 2 deletions

View File

@ -21,12 +21,13 @@ _elm_widget_item_static_focus_efl_ui_focus_object_prepare_logical(Eo *obj, Elm_W
efl_ui_focus_object_prepare_logical(efl_super(obj, ELM_WIDGET_ITEM_STATIC_FOCUS_CLASS));
logical_child = efl_ui_focus_manager_request_subchild(wpd->widget, obj);
if (!logical_child)
{
if (!pd->adapter)
{
pd->adapter = efl_add(EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS, obj, efl_ui_focus_composition_adapter_canvas_object_set(efl_added, wpd->view));
pd->adapter = efl_add(EFL_UI_FOCUS_COMPOSITION_ADAPTER_CLASS, wpd->view,
efl_ui_focus_composition_adapter_canvas_object_set(efl_added, wpd->view)
);
efl_wref_add(pd->adapter, &pd->adapter);
efl_ui_focus_manager_calc_register(wpd->widget, pd->adapter, obj, NULL);
}