summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-02-01 11:27:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-02-01 15:13:30 +0900
commit2ad850e99769c6cc0eb002a497bcfb4432132fa8 (patch)
tree413758802af88dabd2701b23ab3ce74b09b2edd2
parent5a1460782b8e04d5ccd36cb2ffdfdc9e0b89f926 (diff)
genlist/gengrid: Fix focus hilight error
The error was due to an invalid cast between real data and Eo ptr. Thanks @DaveMDS for reporting. Fixes T3122 @fix
-rw-r--r--src/lib/elm_gengrid.c2
-rw-r--r--src/lib/elm_genlist.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 81b1ce503..034236a7d 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -209,7 +209,7 @@ _item_cache_add(Elm_Gen_Item *it)
209 edje_object_signal_emit(itc->base_view, "elm,state,unselected", "elm"); 209 edje_object_signal_emit(itc->base_view, "elm,state,unselected", "elm");
210 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get())) 210 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
211 edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm"); 211 edje_object_signal_emit(itc->base_view, "elm,state,enabled", "elm");
212 if (it == (Elm_Gen_Item *)sd->focused_item && 212 if ((EO_OBJ(it) == sd->focused_item) &&
213 (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)) 213 (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable))
214 edje_object_signal_emit(itc->base_view, "elm,state,unfocused", "elm"); 214 edje_object_signal_emit(itc->base_view, "elm,state,unfocused", "elm");
215 215
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 2f57dead1..538e95491 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -1274,6 +1274,8 @@ static void
1274_elm_genlist_item_state_update(Elm_Gen_Item *it) 1274_elm_genlist_item_state_update(Elm_Gen_Item *it)
1275{ 1275{
1276 Eina_Bool tmp; 1276 Eina_Bool tmp;
1277 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
1278
1277 if (it->selected) 1279 if (it->selected)
1278 { 1280 {
1279 edje_object_signal_emit(VIEW(it), SIGNAL_SELECTED, "elm"); 1281 edje_object_signal_emit(VIEW(it), SIGNAL_SELECTED, "elm");
@@ -1295,7 +1297,7 @@ _elm_genlist_item_state_update(Elm_Gen_Item *it)
1295 edje_object_signal_emit 1297 edje_object_signal_emit
1296 (it->deco_all_view, SIGNAL_EXPANDED, "elm"); 1298 (it->deco_all_view, SIGNAL_EXPANDED, "elm");
1297 } 1299 }
1298 if (it == (Elm_Gen_Item *)GL_IT(it)->wsd->focused_item && 1300 if ((EO_OBJ(it) == sd->focused_item) &&
1299 (elm_widget_focus_highlight_enabled_get(WIDGET(it)) || _elm_config->win_auto_focus_enable)) 1301 (elm_widget_focus_highlight_enabled_get(WIDGET(it)) || _elm_config->win_auto_focus_enable))
1300 edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm"); 1302 edje_object_signal_emit(VIEW(it), SIGNAL_FOCUSED, "elm");
1301} 1303}
@@ -1555,7 +1557,7 @@ _item_cache_add(Elm_Gen_Item *it)
1555 edje_object_signal_emit(itc->base_view, SIGNAL_UNSELECTED, "elm"); 1557 edje_object_signal_emit(itc->base_view, SIGNAL_UNSELECTED, "elm");
1556 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get())) 1558 if (eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()))
1557 edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm"); 1559 edje_object_signal_emit(itc->base_view, SIGNAL_ENABLED, "elm");
1558 if (it == (Elm_Gen_Item *)sd->focused_item && 1560 if ((EO_OBJ(it) == sd->focused_item) &&
1559 (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable)) 1561 (elm_widget_focus_highlight_enabled_get(obj) || _elm_config->win_auto_focus_enable))
1560 edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm"); 1562 edje_object_signal_emit(itc->base_view, SIGNAL_UNFOCUSED, "elm");
1561 1563