genlist : fix focus_set issue on item when mouse up is called 74/104374/3
authorSangHyeon Lee <sh10233.lee@samsung.com>
Tue, 13 Dec 2016 07:52:57 +0000 (16:52 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 13 Dec 2016 10:02:50 +0000 (02:02 -0800)
Change-Id: I4d29d69e66b9a1847c79ca5b7fdaa32864e6791a

src/mobile_lib/elm_genlist.c

index 3f27cfa..e9b2f6b 100644 (file)
@@ -5254,16 +5254,16 @@ _item_mouse_up_cb(void *data,
              else if ((it->select_mode == ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) ||
                       (it->select_mode == ELM_OBJECT_SELECT_MODE_NONE))
                {
+                  Eina_List *l;
+                  Evas_Object *content;
                   if (sd->focused_item != it)
+                    elm_object_item_focus_set(it, EINA_TRUE);
+
+                  sd->focused_content = NULL;
+                  EINA_LIST_FOREACH(it->content_objs, l, content)
                     {
-                       Eina_Bool found = EINA_FALSE;
-                       Elm_Gen_Item *it2 = it;
-                       found = _item_focusable_search(&it2, 1);
-                       if (found && (it == it2))
-                         {
-                            sd->focus_scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN;
-                            elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);
-                         }
+                       if (elm_widget_focused_object_get(content))
+                         sd->focused_content = content;
                     }
                }
           }