list: call "selected" callback after set focus to the selected item
authorJaeun Choi <jaeun12.choi@samsung.com>
Thu, 17 Jul 2014 07:58:36 +0000 (16:58 +0900)
committerJaeun Choi <jaeun12.choi@samsung.com>
Fri, 18 Jul 2014 10:34:13 +0000 (19:34 +0900)
in current code, when a list item is selected, "selected" callback is called first
and then focus is set to the item. this is a problem if another widget, popup for instance,
is created on top of the list in the callback function. in such a case, the popup should
get focused (not the list item). this patch fixes it by changing the order.

@fix

src/lib/elm_list.c

index 99aad4d78760fe66ce279e2fadcc85f75a053bed..7695b7f4678cf6ef865563faa410e80e4f4f5ec4 100644 (file)
@@ -2729,8 +2729,8 @@ elm_list_item_selected_set(Elm_Object_Item *it,
                }
           }
         _item_highlight(item);
-        _item_select(item);
         elm_object_item_focus_set((Elm_Object_Item *)item, EINA_TRUE);
+        _item_select(item);
      }
    else
      {