gengrid: add focus raise feature 46/121246/5
authorSangHyeon Lee <sh10233.lee@samsung.com>
Mon, 27 Mar 2017 09:59:30 +0000 (18:59 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Thu, 20 Apr 2017 10:51:47 +0000 (03:51 -0700)
Change-Id: I345c2881db7e491857639b7772a4c648b297710f
Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
src/lib/elm_gengrid.c

index cd7a201..4705e29 100644 (file)
@@ -2367,6 +2367,7 @@ _elm_gengrid_item_focused(Elm_Object_Item *eo_it)
    Eina_Bool tmp;
    ELM_GENGRID_ITEM_DATA_GET(eo_it, it);
    Evas_Object *obj = WIDGET(it);
+   const char *focusraise = NULL;
    ELM_GENGRID_DATA_GET(obj, sd);
 
    if (it->generation < sd->generation)
@@ -2400,6 +2401,9 @@ _elm_gengrid_item_focused(Elm_Object_Item *eo_it)
         _elm_widget_item_highlight_in_theme(obj, eo_it);
         _elm_widget_highlight_in_theme_update(obj);
         _elm_widget_focus_highlight_start(obj);
+        focusraise = edje_object_data_get(VIEW(it), "focusraise");
+        if ((focusraise) && (!strcmp(focusraise, "on")))
+          evas_object_stack_above(VIEW(it), sd->stack);
      }
 
    eo_do(obj, eo_event_callback_call(ELM_GENGRID_EVENT_ITEM_FOCUSED, eo_it));
@@ -2431,6 +2435,9 @@ _elm_gengrid_item_unfocused(Elm_Object_Item *eo_it)
            (VIEW(focus_it), "elm,state,unfocused", "elm");
      }
 
+   if (it->realized)
+     evas_object_stack_below(VIEW(it), sd->stack);
+
    sd->focused_item = NULL;
    eo_do(obj, eo_event_callback_call(ELM_GENGRID_EVENT_ITEM_UNFOCUSED, eo_it));
    if (_elm_atspi_enabled())