summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-03-22 18:07:27 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-03-22 18:14:19 +0900
commit234c1bed8ac236c25483c2ae64ff0cfd750a85fd (patch)
treed1a2b5771967f2eb57b1f6d6960d825e9e5044ab
parent39dc787bba078f76568b15281c14de9e7aaefd82 (diff)
downloadelementary-234c1bed8ac236c25483c2ae64ff0cfd750a85fd.tar.gz
list: Select the first item when the list widget is just focused first time.
Select the first item if there is no last_focused_item, last_selected_item, and if this focus is done by key event.
-rw-r--r--src/lib/elm_list.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index ea3e0a82f..8b9353eb0 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -1075,7 +1075,8 @@ _elm_list_smart_on_focus(Eo *obj, void *_pd, va_list *list)
else if (sd->last_selected_item)
_elm_list_item_focused((Elm_List_Item *)sd->last_selected_item);
else if (!sd->mouse_down)
- _elm_list_item_focused((Elm_List_Item *)eina_list_data_get(sd->items));
+ elm_list_item_selected_set(
+ eina_list_data_get(sd->items), EINA_TRUE);
_elm_widget_focus_highlight_start(obj);
}
else