[focus] update child_can_focus on parent, when an widget becomes focusable

This commit is contained in:
Shinwoo Kim 2013-04-25 14:59:39 +09:00
parent 48d22cb72c
commit 63e74f695b
1 changed files with 15 additions and 0 deletions

View File

@ -1283,6 +1283,21 @@ _elm_widget_can_focus_set(Eo *obj, void *_pd, va_list *list)
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_WHEEL,
_propagate_event,
(void *)(long)EVAS_CALLBACK_MOUSE_WHEEL);
/* update child focusable-ness on parents, now that a
* focusable child got in */
Elm_Widget_Smart_Data *sdp = sd;
if (!sdp->child_can_focus)
{
sdp->child_can_focus = EINA_TRUE;
while (sdp->parent_obj)
{
if (sdp->child_can_focus) break;
sdp->child_can_focus = EINA_TRUE;
sdp = eo_data_get(sdp->parent_obj, MY_CLASS);
}
}
}
else
{