genlist/gengrid: Fix focus hilight error 98/89898/2
authorSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 27 Sep 2016 10:20:23 +0000 (19:20 +0900)
committerSangHyeon Lee <sh10233.lee@samsung.com>
Thu, 20 Oct 2016 01:42:25 +0000 (10:42 +0900)
This patch is forked by upstream patch
:2ad850e99769c6cc0eb002a497bcfb4432132fa8
written by Jean-Philippe Andre

Change-Id: I73e90561cd1bf6239a4e566bdafbb4786a0f3775

src/lib/elm_gengrid.c
src/lib/elm_genlist.c

index 97f85a8..3189778 100644 (file)
@@ -212,7 +212,7 @@ _item_cache_add(Elm_Gen_Item *it)
           edje_object_signal_emit(itc->base_view, "elm,state,unselected", "elm");
         if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
           edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm");
-        if (it == (Elm_Gen_Item *)sd->focused_item &&
+        if ((EO_OBJ(it) == sd->focused_item) &&
             (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable))
           edje_object_signal_emit(itc->base_view, "elm,state,unfocused", "elm");
 
index bb1f08c..205dbb2 100644 (file)
@@ -1332,6 +1332,7 @@ static void
 _elm_genlist_item_state_update(Elm_Gen_Item *it)
 {
    Eina_Bool tmp;
+   ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
    if (it->selected)
      {
         edje_object_signal_emit(VIEW(it), SIGNAL_SELECTED, "elm");
@@ -1353,7 +1354,7 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it)
           edje_object_signal_emit
              (it->deco_all_view, SIGNAL_EXPANDED, "elm");
      }
-   if (it == (Elm_Gen_Item *)GL_IT(it)->wsd->focused_item &&
+   if ((EO_OBJ(it) == sd->focused_item) &&
        (elm_widget_focus_highlight_enabled_get(WIDGET(it)) || _elm_config->win_auto_focus_enable))
      edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm");
 }
@@ -1613,7 +1614,7 @@ _item_cache_add(Elm_Gen_Item *it)
      edje_object_signal_emit(itc->base_view, SIGNAL_UNSELECTED, "elm");
    if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
      edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm");
-   if (it == (Elm_Gen_Item *)sd->focused_item &&
+   if ((EO_OBJ(it) == sd->focused_item) &&
        (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable))
      edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm");