From 598eac0b2f7eda5aee0c127d25cc0a907f844413 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Fri, 11 Mar 2011 11:44:23 +0000 Subject: [PATCH] elementary/elm_widget - added minor exceptions. SVN revision: 57688 --- src/lib/elm_widget.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index 6c448fd..46c0603 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -1589,11 +1589,12 @@ elm_widget_focus_steal(Evas_Object *obj) { parent = elm_widget_parent_get(parent); sd = evas_object_smart_data_get(parent); - if (elm_widget_focus_get(sd->resize_obj)) + if (sd->resize_obj) { - elm_widget_focused_object_clear(sd->resize_obj); + if (elm_widget_focus_get(sd->resize_obj)) + elm_widget_focused_object_clear(sd->resize_obj); } - else + else { const Eina_List *l; Evas_Object *child; @@ -2537,7 +2538,11 @@ _newest_focus_order_get(Evas_Object *obj, unsigned int *newest_focus_order, Eina if (!ret) continue; best = ret; } - if ((can_focus_only) && (!elm_widget_can_focus_get(best))) return NULL; + if (can_focus_only) + { + if ((!best) || (!elm_widget_can_focus_get(best))) + return NULL; + } return best; } -- 2.7.4