efl_ui_widget: move focus_highlight to the window
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Wed, 27 Feb 2019 19:00:39 +0000 (14:00 -0500)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 8 Mar 2019 11:49:36 +0000 (20:49 +0900)
summary_:
the widget implementation just redirected calls from efl_ui_widget to
efl_ui_win. Which makes the properties unncessesary on the widget. This
commit moves them now to the window.

The legacy implementation of the window can now go away, as this is
taken care of by eolian directly.

ref T7553

Depends on D8017

Reviewers: woohyun

Reviewed By: woohyun

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7553

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8025

src/lib/elementary/efl_ui_widget.c
src/lib/elementary/efl_ui_widget.eo
src/lib/elementary/efl_ui_win.c
src/lib/elementary/efl_ui_win.eo
src/lib/elementary/elm_gengrid.c
src/lib/elementary/elm_genlist.c
src/lib/elementary/elm_list.c
src/lib/elementary/elm_main.c
src/lib/elementary/elm_toolbar.c
src/lib/elementary/elm_win_legacy.h

index db3d5cb..e1eeb84 100644 (file)
@@ -343,74 +343,6 @@ _efl_ui_widget_focus_highlight_object_get(const Evas_Object *obj)
    return NULL;
 }
 
-EOLIAN static Eina_Bool
-_efl_ui_widget_focus_highlight_enabled_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
-{
-   // Forward to closest parent Window
-   const Evas_Object *win = elm_widget_top_get(obj);
-
-   if (win && efl_isa(win, EFL_UI_WIN_CLASS))
-     return elm_win_focus_highlight_enabled_get(win);
-
-   return EINA_FALSE;
-}
-
-EOLIAN static void
-_efl_ui_widget_focus_highlight_enabled_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, Eina_Bool enable)
-{
-   // Forward to closest parent Window
-   Evas_Object *win = elm_widget_top_get(obj);
-
-   if (win && efl_isa(win, EFL_UI_WIN_CLASS))
-     elm_win_focus_highlight_enabled_set(win, enable);
-}
-
-EOLIAN static Eina_Bool
-_efl_ui_widget_focus_highlight_animate_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
-{
-   // Forward to closest parent Window
-   const Evas_Object *win = elm_widget_top_get(obj);
-
-   if (win && efl_isa(win, EFL_UI_WIN_CLASS))
-     return elm_win_focus_highlight_animate_get(win);
-
-   return EINA_FALSE;
-}
-
-EOLIAN static void
-_efl_ui_widget_focus_highlight_animate_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, Eina_Bool enable)
-{
-   // Forward to closest parent Window
-   Evas_Object *win = elm_widget_top_get(obj);
-
-   if (win && efl_isa(win, EFL_UI_WIN_CLASS))
-     elm_win_focus_highlight_animate_set(win, enable);
-}
-
-EOLIAN static Eina_Bool
-_efl_ui_widget_focus_highlight_style_set(Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED, const char *style)
-{
-   // Forward to closest parent Window
-   Evas_Object *win = elm_widget_top_get(obj);
-
-   if (win && efl_isa(win, EFL_UI_WIN_CLASS))
-     return efl_ui_widget_focus_highlight_style_set(win, style);
-
-   return EINA_FALSE;
-}
-
-EOLIAN static const char *
-_efl_ui_widget_focus_highlight_style_get(const Eo *obj, Elm_Widget_Smart_Data *sd EINA_UNUSED)
-{
-   // Forward to closest parent Window
-   Evas_Object *win = elm_widget_top_get(obj);
-
-   if (win && efl_isa(win, EFL_UI_WIN_CLASS))
-     return elm_win_focus_highlight_style_get(win);
-
-   return NULL;
-}
-
 static Eina_Bool
 _candidacy_exam(Eo *obj)
 {
index 8a3d7b5..14fcdff 100644 (file)
@@ -511,92 +511,16 @@ abstract @beta Efl.Ui.Widget extends Efl.Canvas.Group implements Efl.Access.Obje
             region: Eina.Rect; [[The rectangle area.]]
          }
       }
-      @property focus_highlight_enabled {
-         [[Whether focus highlight is enabled or not.
-
-           As of EFL 1.21 focus highlight properties apply to a single window,
-           not a single widget. As a consequence, calls to this function may
-           be forwarded to the parent window. Future versions of EFL may
-           implement widget-specific focus highlight properties.
-
-           See also @.widget_top.
-           See also @.focus_highlight_style.
-           See also @.focus_highlight_animate.
-         ]]
-         set {
-            [[Set the enabled status for the focus highlight in a window.
-
-              This function will enable or disable the focus highlight,
-              regardless of the global setting for it.
-            ]]
-         }
-         get {
-            [[Get the enabled value of the focus highlight for this window.]]
-         }
-         values {
-            enabled: bool; [[The enabled value for the highlight.]]
-         }
-      }
-      @property focus_highlight_style {
-         [[Control the widget focus highlight style.
-
-           If $style is $null, the default will be used.
-
-           As of EFL 1.21 focus highlight properties apply to a single window,
-           not a single widget. As a consequence, calls to this function may
-           be forwarded to the parent window. Future versions of EFL may
-           implement widget-specific focus highlight properties.
-
-           See also @.widget_top.
-           See also @.focus_highlight_enabled.
-           See also @.focus_highlight_animate.
-         ]]
-         set {
-            /* FIXME: This is async... success here means nothing. */
-            return: bool; [[$true on success, $false otherwise.]]
-         }
-         get {
-         }
-         values {
-            style: string @nullable; [[The name of the focus highlight style.]]
-         }
-      }
-      @property focus_highlight_animate {
-         [[Whether focus highlight should animate or not.
-
-           As of EFL 1.21 focus highlight properties apply to a single window,
-           not a single widget. As a consequence, calls to this function may
-           be forwarded to the parent window. Future versions of EFL may
-           implement widget-specific focus highlight properties.
-
-           See also @.widget_top.
-           See also @.focus_highlight_style.
-           See also @.focus_highlight_enabled.
-         ]]
-         set {
-            [[Set the animate status for the focus highlight for this window.
-
-              This function will enable or disable the animation of focus
-              highlight.
-            ]]
-         }
-         get {
-            [[Get the animate value of the focus highlight for this window.]]
-         }
-         values {
-            animate: bool; [[The enabled value for the highlight animation.]]
-         }
-      }
-       //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
-       part_access_object_get @const {
+      //TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
+      part_access_object_get @const {
          [[Get the access object of given part of the widget.
-           @since 1.18]]
+          @since 1.18]]
          return: Efl.Canvas.Object;
          params {
             @in part: string; [[The object's part name to get access object]]
          }
-       }
-       //
+      }
+      //
       //TIZEN_ONLY(20180607): Restore legacy focus
       newest_focus_order_get @const {
           [[Get newest focus in order]]
index 58c2b35..5896455 100644 (file)
@@ -1419,8 +1419,6 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
    Eina_Bool visible_changed;
    Eina_Bool common_visible;
    const char *sig = NULL;
-   const char *focus_style_target = NULL;
-   const char *focus_style_previous = NULL;
 
    _elm_win_focus_highlight_reconfigure_job_stop(sd);
 
@@ -1486,18 +1484,11 @@ _elm_win_focus_highlight_reconfigure_job(void *data)
         goto the_end;
      }
 
-   if (previous)
-     focus_style_previous = elm_widget_focus_highlight_style_get(previous);
-   focus_style_target = elm_widget_focus_highlight_style_get(target);
-
-   if (sd->focus_highlight.theme_changed ||
-       (focus_style_target != focus_style_previous))
+   if (sd->focus_highlight.theme_changed)
      {
         const char *str;
 
-        if (focus_style_target)
-          str = focus_style_target;
-        else if (sd->focus_highlight.style)
+       if (sd->focus_highlight.style)
           str = sd->focus_highlight.style;
         else
           str = "default";
@@ -8004,9 +7995,8 @@ _efl_ui_win_keygrab_unset(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *
 }
 
 EOLIAN static void
-_efl_ui_win_efl_ui_widget_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled)
+_efl_ui_win_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool enabled)
 {
-   // Do not call efl_super() here. Only Win handles this property.
    enabled = !!enabled;
    if (sd->focus_highlight.enabled == enabled)
      return;
@@ -8020,9 +8010,8 @@ _efl_ui_win_efl_ui_widget_focus_highlight_enabled_set(Eo *obj EINA_UNUSED, Efl_U
 }
 
 EOLIAN static Eina_Bool
-_efl_ui_win_efl_ui_widget_focus_highlight_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
+_efl_ui_win_focus_highlight_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
 {
-   // Do not call efl_super() here. Only Win handles this property.
    return sd->focus_highlight.enabled;
 }
 
@@ -8069,9 +8058,8 @@ _efl_ui_win_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Win_Data *sd)
 }
 
 EOLIAN static Eina_Bool
-_efl_ui_win_efl_ui_widget_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *style)
+_efl_ui_win_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *style)
 {
-   // Do not call efl_super() here. Only Win handles this property.
    if (!eina_stringshare_replace(&sd->focus_highlight.style, style))
      return EINA_TRUE;
 
@@ -8081,16 +8069,14 @@ _efl_ui_win_efl_ui_widget_focus_highlight_style_set(Eo *obj EINA_UNUSED, Efl_Ui_
 }
 
 EOLIAN static const char*
-_efl_ui_win_efl_ui_widget_focus_highlight_style_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
+_efl_ui_win_focus_highlight_style_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
 {
-   // Do not call efl_super() here. Only Win handles this property.
    return sd->focus_highlight.style;
 }
 
 EOLIAN static void
-_efl_ui_win_efl_ui_widget_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool animate)
+_efl_ui_win_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, Eina_Bool animate)
 {
-   // Do not call efl_super() here. Only Win handles this property.
    animate = !!animate;
    if (sd->focus_highlight.animate == animate)
      return;
@@ -8101,9 +8087,8 @@ _efl_ui_win_efl_ui_widget_focus_highlight_animate_set(Eo *obj EINA_UNUSED, Efl_U
 }
 
 EOLIAN static Eina_Bool
-_efl_ui_win_efl_ui_widget_focus_highlight_animate_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
+_efl_ui_win_focus_highlight_animate_get(const Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
 {
-   // Do not call efl_super() here. Only Win handles this property.
    return sd->focus_highlight.animate;
 }
 
@@ -10176,42 +10161,6 @@ elm_win_focus_get(const Efl_Ui_Win *obj)
    return efl_ui_focus_object_focus_get(obj);
 }
 
-EAPI void
-elm_win_focus_highlight_style_set(Elm_Win *obj, const char *style)
-{
-   elm_widget_focus_highlight_style_set(obj, style);
-}
-
-EAPI const char *
-elm_win_focus_highlight_style_get(const Elm_Win *obj)
-{
-   return elm_widget_focus_highlight_style_get(obj);
-}
-
-EAPI Eina_Bool
-elm_win_focus_highlight_enabled_get(const Efl_Ui_Win *obj)
-{
-   return elm_widget_focus_highlight_enabled_get(obj);
-}
-
-EAPI void
-elm_win_focus_highlight_enabled_set(Efl_Ui_Win *obj, Eina_Bool enabled)
-{
-   efl_ui_widget_focus_highlight_enabled_set(obj, enabled);
-}
-
-EAPI void
-elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate)
-{
-   efl_ui_widget_focus_highlight_animate_set(obj, animate);
-}
-
-EAPI Eina_Bool
-elm_win_focus_highlight_animate_get(const Elm_Win *obj)
-{
-   return efl_ui_widget_focus_highlight_animate_get(obj);
-}
-
 EAPI Eina_Bool
 elm_win_available_profiles_get(const Elm_Win *obj, char ***profiles, unsigned int *count)
 {
index ade025b..a222622 100644 (file)
@@ -878,6 +878,64 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac
          }
          return: iterator<const(Efl.Input.Pointer)>; [[Iterator to pointer positions]]
       }
+      @property focus_highlight_enabled {
+         [[Whether focus highlight is enabled or not.
+
+           See also @.focus_highlight_style.
+           See also @.focus_highlight_animate.
+         ]]
+         set {
+            [[Set the enabled status for the focus highlight in a window.
+
+              This function will enable or disable the focus highlight,
+              regardless of the global setting for it.
+            ]]
+         }
+         get {
+            [[Get the enabled value of the focus highlight for this window.]]
+         }
+         values {
+            enabled: bool; [[The enabled value for the highlight.]]
+         }
+      }
+      @property focus_highlight_style {
+         [[Control the widget focus highlight style.
+
+           If $style is $null, the default will be used.
+
+           See also @.focus_highlight_enabled.
+           See also @.focus_highlight_animate.
+         ]]
+         set {
+            /* FIXME: This is async... success here means nothing. */
+            return: bool; [[$true on success, $false otherwise.]]
+         }
+         get {
+         }
+         values {
+            style: string @nullable; [[The name of the focus highlight style.]]
+         }
+      }
+      @property focus_highlight_animate {
+         [[Whether focus highlight should animate or not.
+
+           See also @.focus_highlight_style.
+           See also @.focus_highlight_enabled.
+         ]]
+         set {
+            [[Set the animate status for the focus highlight for this window.
+
+              This function will enable or disable the animation of focus
+              highlight.
+            ]]
+         }
+         get {
+            [[Get the animate value of the focus highlight for this window.]]
+         }
+         values {
+            animate: bool; [[The enabled value for the highlight animation.]]
+         }
+      }
    }
    implements {
       class.constructor;
@@ -894,9 +952,6 @@ class @beta Efl.Ui.Win extends Efl.Ui.Widget implements Efl.Canvas.Scene, Efl.Ac
       Efl.Gfx.Stack.lower_to_bottom; [[This action is ignored by the Window.]]
       Efl.Ui.Widget.theme_apply;
       Efl.Ui.Focus.Object.focus { get; }
-      Efl.Ui.Widget.focus_highlight_style { get; set; }
-      Efl.Ui.Widget.focus_highlight_enabled { get; set; }
-      Efl.Ui.Widget.focus_highlight_animate { get; set; }
       Efl.Ui.Focus.Object.on_focus_update;
       Efl.Ui.Widget.widget_event;
       Efl.Ui.Widget_Focus_Manager.focus_manager_create;
index b7df21e..f57a0ce 100644 (file)
@@ -225,6 +225,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
    Item_Cache *itc = NULL;
    ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
    Evas_Object *obj = sd->obj;
+   Evas_Object *win = elm_widget_top_get(obj);
 
    evas_event_freeze(evas_object_evas_get(obj));
    if (sd->item_cache_max > 0)
@@ -250,7 +251,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
         if (elm_wdg_item_disabled_get(EO_OBJ(it)))
           edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm");
         if ((EO_OBJ(it) == sd->focused_item) &&
-            (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable))
+            (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable))
           edje_object_signal_emit(itc->base_view, "elm,state,unfocused", "elm");
 
         ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
@@ -1686,9 +1687,10 @@ _elm_gengrid_item_focus_update(Elm_Gen_Item *it)
 {
    const char *focus_raise;
    Evas_Object *obj = WIDGET(it);
+   Evas_Object *win = elm_widget_top_get(obj);
    ELM_GENGRID_DATA_GET(obj, sd);
 
-   if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)
+   if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
      {
         edje_object_signal_emit
            (VIEW(it), "elm,state,focused", "elm");
@@ -2792,6 +2794,7 @@ _elm_gengrid_item_unfocused(Elm_Object_Item *eo_it)
 {
    ELM_GENGRID_ITEM_DATA_GET(eo_it, it);
    Evas_Object *obj = WIDGET(it);
+   Evas_Object *win = elm_widget_top_get(obj);
    ELM_GENGRID_DATA_GET(obj, sd);
 
    if (it->generation < sd->generation)
@@ -2804,7 +2807,7 @@ _elm_gengrid_item_unfocused(Elm_Object_Item *eo_it)
        (eo_it != sd->focused_item))
      return;
 
-   if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)
+   if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
      {
         ELM_GENGRID_ITEM_DATA_GET(sd->focused_item, focus_it);
         edje_object_signal_emit
index f544d8e..ad120cc 100644 (file)
@@ -1684,6 +1684,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
    Item_Cache *itc = NULL;
    ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
    Evas_Object *obj = sd->obj;
+   Evas_Object *win = elm_widget_top_get(obj);
    Evas *e = evas_object_evas_get(obj);
 
    evas_event_freeze(e);
@@ -1715,7 +1716,7 @@ _item_cache_add(Elm_Gen_Item *it, Eina_List *contents)
    if (elm_wdg_item_disabled_get(EO_OBJ(it)))
      edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm");
    if ((EO_OBJ(it) == sd->focused_item) &&
-       (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable))
+       (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable))
      edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm");
 
    //Tizen Only(20160307)
@@ -1901,9 +1902,10 @@ _elm_genlist_item_focus_update(Elm_Gen_Item *it)
 {
    const char *focus_raise;
    Evas_Object *obj = WIDGET(it);
+   Evas_Object *win = elm_widget_top_get(obj);
    ELM_GENLIST_DATA_GET(obj, sd);
 
-   if (elm_widget_focus_highlight_enabled_get(obj)
+   if (elm_win_focus_highlight_enabled_get(win)
        || _elm_config->win_auto_focus_enable)
      edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm");
 
@@ -3049,6 +3051,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
 
    ELM_GENLIST_ITEM_DATA_GET(eo_it, it);
    Evas_Object *obj = WIDGET(it);
+   Evas_Object *win = elm_widget_top_get(obj);
    ELM_GENLIST_DATA_GET(obj, sd);
 
    if (_is_no_select(it))
@@ -3058,7 +3061,7 @@ _elm_genlist_item_unfocused(Elm_Object_Item *eo_it)
        (eo_it != sd->focused_item))
      return;
 
-   if (elm_widget_focus_highlight_enabled_get(obj))
+   if (elm_win_focus_highlight_enabled_get(win))
      {
         ELM_GENLIST_ITEM_DATA_GET(sd->focused_item, focus_it);
         edje_object_signal_emit(VIEW(focus_it), SIGNAL_UNFOCUSED, "elm");
index 1bbae20..85cdd74 100644 (file)
@@ -1160,6 +1160,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
 {
    ELM_LIST_ITEM_DATA_GET(eo_it, it);
    ELM_LIST_DATA_GET_FROM_ITEM(it, sd);
+   Evas_Object *win = elm_widget_top_get(WIDGET(it));
    Evas_Coord x, y, w, h, sx, sy, sw, sh;
    const char *focus_raise;
 
@@ -1183,7 +1184,7 @@ _elm_list_item_focused(Elm_Object_Item *eo_it)
           }
      }
    sd->focused_item = eo_it;
-   if (elm_widget_focus_highlight_enabled_get(WIDGET(it)) || _elm_config->win_auto_focus_enable)
+   if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
      {
         edje_object_signal_emit
            (VIEW(it), "elm,state,focused", "elm");
@@ -1202,6 +1203,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it)
 {
    ELM_LIST_ITEM_DATA_GET(eo_it, it);
    Evas_Object *obj = WIDGET(it);
+   Evas_Object *win = elm_widget_top_get(obj);
    ELM_LIST_DATA_GET(obj, sd);
 
    if ((!sd) || (!sd->focused_item) ||
@@ -1211,7 +1213,7 @@ _elm_list_item_unfocused(Elm_Object_Item *eo_it)
    if (_is_no_select(it))
      return;
 
-   if (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)
+   if (elm_win_focus_highlight_enabled_get(win) || _elm_config->win_auto_focus_enable)
      {
         ELM_LIST_ITEM_DATA_GET(sd->focused_item, focus_it);
         edje_object_signal_emit
index 0961f90..26fd5d5 100644 (file)
@@ -1607,14 +1607,14 @@ elm_object_focus_highlight_style_set(Evas_Object *obj,
                                      const char  *style)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
-   return elm_widget_focus_highlight_style_set(obj, style);
+   return elm_win_focus_highlight_style_set(elm_widget_top_get(obj), style);
 }
 
 EAPI const char *
 elm_object_focus_highlight_style_get(const Evas_Object *obj)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(obj, NULL);
-   return elm_widget_focus_highlight_style_get(obj);
+   return elm_win_focus_highlight_style_get(elm_widget_top_get(obj));
 }
 
 EAPI const char *
index e2c7d5a..0799bdb 100644 (file)
@@ -669,6 +669,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
 {
    ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
    Evas_Object *obj = WIDGET(it);
+   Evas_Object *win = elm_widget_top_get(obj);
    ELM_TOOLBAR_DATA_GET(obj, sd);
    const char *focus_raise;
 
@@ -691,7 +692,7 @@ _elm_toolbar_item_focused(Elm_Object_Item *eo_it)
          break;
      }
 
-   if (elm_widget_focus_highlight_enabled_get(obj))
+   if (elm_win_focus_highlight_enabled_get(win))
      {
         elm_layout_signal_emit
            (VIEW(it), "elm,state,focused", "elm");
@@ -712,6 +713,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
 {
    ELM_TOOLBAR_ITEM_DATA_GET(eo_it, it);
    Evas_Object *obj = WIDGET(it);
+   Evas_Object *win = elm_widget_top_get(obj);
    ELM_TOOLBAR_DATA_GET(obj, sd);
 
    if ((!sd) || !sd->focused_item ||
@@ -719,7 +721,7 @@ _elm_toolbar_item_unfocused(Elm_Object_Item *eo_it)
      return;
    if (sd->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
      return;
-   if (elm_widget_focus_highlight_enabled_get(obj))
+   if (elm_win_focus_highlight_enabled_get(win))
      {
         ELM_TOOLBAR_ITEM_DATA_GET(sd->focused_item, focus_it);
         elm_layout_signal_emit
index ac31630..44dde91 100644 (file)
@@ -1200,8 +1200,8 @@ EAPI Eina_Bool elm_win_keygrab_set(Elm_Win *obj, const char *key, Evas_Modifier_
 EAPI Eina_Bool elm_win_keygrab_unset(Elm_Win *obj, const char *key, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
 
 /**
- * @brief Gets the elm_win object from any child object
- * 
+ * @brief Get the elm_win object from any child object
+ *
  * @return The elm_win, or @c NULL on failure
  * @since 1.20
  */
@@ -1297,7 +1297,7 @@ EAPI void elm_win_focus_highlight_animate_set(Elm_Win *obj, Eina_Bool animate);
 EAPI Eina_Bool elm_win_focus_highlight_animate_get(const Elm_Win *obj);
 
 /**
- * @brief Raises a window object.
+ * @brief Raise a window object.
  *
  * Places the window pointed by @c obj at the top of the stack, so that it's
  * not covered by any other window.