diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index 395a6dcc58..56392f0f83 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/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/legacy/elementary/src/lib/elm_widget.c b/legacy/elementary/src/lib/elm_widget.c index 5931f0cd56..c679771df9 100644 --- a/legacy/elementary/src/lib/elm_widget.c +++ b/legacy/elementary/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