eunue pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=3707c0b985611c2e6d23dbe75361dc756c2e36f6

commit 3707c0b985611c2e6d23dbe75361dc756c2e36f6
Author: Jaeun Choi <jaeun12.c...@samsung.com>
Date:   Tue Apr 14 19:20:16 2015 +0900

    elm_gengrid: mark cursor_engine_only in data and update state when realized
    
    @fix
---
 src/lib/elm_gen_common.h |  1 +
 src/lib/elm_gengrid.c    | 17 +++++++++++++----
 2 files changed, 14 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 bb2b92a..9a4937e 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -1014,6 +1014,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;
@@ -4430,17 +4433,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)
 {
+   ELM_GENGRID_ITEM_DATA_GET(eo_it, it);
    Eina_Bool ret;
-   return eo_do_ret(it, ret, elm_wdg_item_cursor_engine_only_get());
+   if (it->realized)
+     return eo_do_ret(eo_it, ret, elm_wdg_item_cursor_engine_only_get());
+   else return it->cursor_engine_only;
 }
 
 EAPI void

-- 


Reply via email to