summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel@osg.samsung.com>2017-10-19 13:47:15 +0200
committerMarcel Hollerbach <marcel@osg.samsung.com>2017-10-19 15:20:59 +0200
commitf720115f082f32960baf6c01a517eaa398f3ef4d (patch)
tree644d3204ebf960452d904245a382df26ae3a94fa
parenteb997134d0bd1c2442f7396f956f970851d73be2 (diff)
elm_widget: update parent instead of unregister for the case of parent
change This means we maintain the focus state over a parent change
-rw-r--r--src/lib/elementary/elm_widget.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index 66995c9a93..cc872e0c16 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -355,7 +355,6 @@ _elm_widget_focus_state_apply(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED, El
355 355
356 if (//check if we have changed the manager 356 if (//check if we have changed the manager
357 (current_state.manager != configured_state->manager) || 357 (current_state.manager != configured_state->manager) ||
358 (current_state.parent != configured_state->parent) ||
359 //check if we are already registered but in a different state 358 //check if we are already registered but in a different state
360 (current_state.logical != configured_state->logical)) 359 (current_state.logical != configured_state->logical))
361 { 360 {
@@ -364,6 +363,12 @@ _elm_widget_focus_state_apply(Eo *obj, Elm_Widget_Smart_Data *pd EINA_UNUSED, El
364 registered = EINA_FALSE; 363 registered = EINA_FALSE;
365 } 364 }
366 365
366 //the parent may has changed
367 if (current_state.parent != configured_state->parent && registered)
368 {
369 return efl_ui_focus_manager_calc_update_parent(current_state.manager, obj, configured_state->parent);
370 }
371
367 if (!registered) 372 if (!registered)
368 { 373 {
369 if (configured_state->logical) 374 if (configured_state->logical)