forked from enlightenment/efl
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:
parent
eb997134d0
commit
f720115f08
|
@ -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
|
if (//check if we have changed the manager
|
||||||
(current_state.manager != configured_state->manager) ||
|
(current_state.manager != configured_state->manager) ||
|
||||||
(current_state.parent != configured_state->parent) ||
|
|
||||||
//check if we are already registered but in a different state
|
//check if we are already registered but in a different state
|
||||||
(current_state.logical != configured_state->logical))
|
(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;
|
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 (!registered)
|
||||||
{
|
{
|
||||||
if (configured_state->logical)
|
if (configured_state->logical)
|
||||||
|
|
Loading…
Reference in New Issue