List: Focus set on item content objects, the item content objects should be checked...
authorefl <chinmaya@efl.(none)>
Wed, 11 Jun 2014 05:07:01 +0000 (14:07 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 11 Jun 2014 05:07:01 +0000 (14:07 +0900)
Summary:
Upon focus set, if the item content object is not of type widget
(could be of type Evas_Rectnagle) focus set/get is not possible.
ERR<17428>:eo lib/eo/eo.c:603 _eo_call_resolve() in elm_widget.eo.c:112: you called func 'elm_obj_widget_can_focus_get' (239) which is unknown in class 'Evas_Rectangle'.
ERR<17428>:eo lib/eo/eo.c:788 _eo_api_op_id_get() in elm_widget.eo.c:212: unable to resolve regular api func 'elm_obj_widget_child_can_focus_get' 0xb75e6f40 in class 'Evas_Rectangle'

Test Plan: elementary_test -to "list focus" (make focus_on_selection enabled and give a right key event when a content object is focused)

Reviewers: seoz, SanghyeonLee, eagleeye

CC: seoz
Differential Revision: https://phab.enlightenment.org/D972

src/lib/elm_list.c

index cbf69b2e69e4b001bc154df48c7ffb66cef44c57..e6c94dff4afec27b443753f91bb32fe67c2dd56d 100644 (file)
@@ -249,10 +249,10 @@ _elm_list_item_content_focus_set(Elm_List_Item *it, Elm_Focus_Direction dir,
    Evas_Object *focus_chain[2];
    Evas_Object *focused = NULL;
    int idx;
-
-   if (it->icon && elm_object_focus_allow_get(it->icon))
+   
+   if (it->icon && elm_object_widget_check(it->icon) && elm_object_focus_allow_get(it->icon))
      focus_chain[focus_objs++] = it->icon;
-   if (it->end && elm_object_focus_allow_get(it->end))
+   if (it->end && elm_object_widget_check(it->end) && elm_object_focus_allow_get(it->end))
      focus_chain[focus_objs++] = it->end;
 
    if (!focus_objs)