From: WooHyun Jung Date: Sat, 26 Jan 2013 06:53:10 +0000 (+0000) Subject: elementary/elm_widget : A widget which doesn't have focus_region_get should give... X-Git-Tag: submit/efl/20131021.015827~1063 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=081633b5fa44a3e78e002a2e13e2c194e97d5bf4;p=platform%2Fupstream%2Felementary.git elementary/elm_widget : A widget which doesn't have focus_region_get should give its width and height for correct focus_region_show. SVN revision: 83347 --- diff --git a/ChangeLog b/ChangeLog index 395a6dc..56392f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -952,3 +952,7 @@ 2012-01-26 ChanWook Jung (jchanwook@gmail.com) * Expand elm_transit tween_mode and add twee_mode_factor_set(),get() APIs + +2012-01-26 WooHyun Jung + + * A widget which doesn't have focus_region_get should give its width and height for correct focus_region_show. diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index 5931f0c..c679771 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -3205,17 +3205,16 @@ elm_widget_focus_region_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) { - if (!_elm_widget_is(obj)) + ELM_WIDGET_CHECK(obj) EINA_FALSE; + Eina_Bool ret = EINA_FALSE; + eo_do((Eo *) obj, elm_wdg_focus_region_get(x, y, w, h, &ret)); + if (!ret) { evas_object_geometry_get(obj, NULL, NULL, w, h); if (x) *x = 0; if (y) *y = 0; - return EINA_FALSE; } - - Eina_Bool ret = EINA_FALSE; - eo_do((Eo *) obj, elm_wdg_focus_region_get(x, y, w, h, &ret)); - return ret; + return EINA_TRUE; } static void