elm_widget: update parent instead of unregister for the case of parent

change

This means we maintain the focus state over a parent change
This commit is contained in:
Marcel Hollerbach 2017-10-19 13:47:15 +02:00
parent eb997134d0
commit f720115f08
1 changed files with 6 additions and 1 deletions

View File

@ -355,7 +355,6 @@ _elm_widget_focus_state_apply(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED, El
if (//check if we have changed the manager
(current_state.manager != configured_state->manager) ||
(current_state.parent != configured_state->parent) ||
//check if we are already registered but in a different state
(current_state.logical != configured_state->logical))
{
@ -364,6 +363,12 @@ _elm_widget_focus_state_apply(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED, El
registered = EINA_FALSE;
}
//the parent may has changed
if (current_state.parent != configured_state->parent && registered)
{
return efl_ui_focus_manager_calc_update_parent(current_state.manager, obj, configured_state->parent);
}
if (!registered)
{
if (configured_state->logical)