Gengrid: Modified to handle the focus highlight on unrealized items 01/37501/1 accepted/tizen/common/20150401.075645 accepted/tizen/mobile/20150401.133254 accepted/tizen/tv/20150402.122542 accepted/tizen/wearable/20150401.132239 submit/tizen/20150331.063020
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Mon, 30 Mar 2015 06:57:36 +0000 (15:57 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Mon, 30 Mar 2015 07:15:37 +0000 (16:15 +0900)
This commit is related to 260cdd6150d567fcee8d1afaf690e4b90cd16a2b.

When unrealized item is focused, edje object is not exist,
so genlist cannot read the focus highlight information from edje object.
Therefore, when the item is realized, check the item is focused or not and
need to update focus highlight.

Change-Id: I587e905b880ea2b9beded2429b2f661844d10c98

src/lib/elm_gengrid.c

index 80a1418..f205535 100644 (file)
@@ -1013,6 +1013,17 @@ _item_realize(Elm_Gen_Item *it)
 
    if (eo_it == sd->focused_item)
      {
+        const char *focus_raise;
+        if (elm_widget_focus_highlight_enabled_get(WIDGET(it)))
+          {
+             edje_object_signal_emit
+                (VIEW(it), "elm,state,focused", "elm");
+          }
+
+        focus_raise = edje_object_data_get(VIEW(it), "focusraise");
+        if ((focus_raise) && (!strcmp(focus_raise, "on")))
+          evas_object_raise(VIEW(it));
+
         _elm_widget_item_highlight_in_theme(WIDGET(it), EO_OBJ(it));
         _elm_widget_highlight_in_theme_update(WIDGET(it));
         _elm_widget_focus_highlight_start(WIDGET(it));