From a7be49ea0744536f709d923c877e8531f16413bb Mon Sep 17 00:00:00 2001 From: Jaeun Choi Date: Tue, 14 Apr 2015 19:20:16 +0900 Subject: [PATCH] elm_gengrid: mark cursor_engine_only in data and update state when realized @fix Conflicts: src/lib/elm_gengrid.c Change-Id: I772168d4c6bfb6a5bf1e1aea286ff0fcd2ccf4b2 Origin: upstream --- src/lib/elm_gen_common.h | 1 + src/lib/elm_gengrid.c | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/lib/elm_gen_common.h b/src/lib/elm_gen_common.h index ec36ce9..74b13ae 100644 --- a/src/lib/elm_gen_common.h +++ b/src/lib/elm_gen_common.h @@ -66,6 +66,7 @@ struct Elm_Gen_Item Eina_Bool decorate_it_set : 1; /**< item uses style mode for highlight/select */ Eina_Bool flipped : 1; /**< a flag that shows the flip status of the item. */ Eina_Bool has_contents : 1; /**< content objs have or previously did exist (size calcs) */ + Eina_Bool cursor_engine_only : 1; }; #endif diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index f205535..7435e4c 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -1011,6 +1011,9 @@ _item_realize(Elm_Gen_Item *it) if (it->mouse_cursor) eo_do(eo_it, elm_wdg_item_cursor_set(it->mouse_cursor)); + if (it->cursor_engine_only) + eo_do(eo_it, elm_wdg_item_cursor_engine_only_set(it->cursor_engine_only)); + if (eo_it == sd->focused_item) { const char *focus_raise; @@ -4410,16 +4413,23 @@ elm_gengrid_item_cursor_style_get(const Elm_Object_Item *it) } EAPI void -elm_gengrid_item_cursor_engine_only_set(Elm_Object_Item *it, +elm_gengrid_item_cursor_engine_only_set(Elm_Object_Item *eo_it, Eina_Bool engine_only) { - eo_do(it, elm_wdg_item_cursor_engine_only_set(engine_only)); + ELM_GENGRID_ITEM_DATA_GET(eo_it, it); + it->cursor_engine_only = engine_only; + if (it->realized) + eo_do(eo_it, elm_wdg_item_cursor_engine_only_set(engine_only)); } EAPI Eina_Bool -elm_gengrid_item_cursor_engine_only_get(const Elm_Object_Item *it) +elm_gengrid_item_cursor_engine_only_get(const Elm_Object_Item *eo_it) { - return eo_do( it, elm_wdg_item_cursor_engine_only_get()); + ELM_GENGRID_ITEM_DATA_GET(eo_it, it); + Eina_Bool ret; + if (it->realized) + return eo_do(eo_it, elm_wdg_item_cursor_engine_only_get()); + else return it->cursor_engine_only; } EAPI void -- 2.7.4