elementary/elm_scroller : When focus_next is tried on the unfocused
authorwoohyun <woohyun@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Jan 2012 04:52:44 +0000 (04:52 +0000)
committerwoohyun <woohyun@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 12 Jan 2012 04:52:44 +0000 (04:52 +0000)
scroller, only scroller(not the one of the child objects) will be set
as focused. This is because scroller is focusable.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@67113 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_scroller.c

index 90380ae..4f7a598 100644 (file)
@@ -192,8 +192,11 @@ _elm_scroller_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, E
    cur = wd->content;
 
    /* Try Focus cycle in subitem */
-   if ((elm_widget_can_focus_get(cur)) || (elm_widget_child_can_focus_get(cur)))
-     return elm_widget_focus_next_get(cur, dir, next);
+   if (elm_widget_focus_get(obj))
+     {
+        if ((elm_widget_can_focus_get(cur)) || (elm_widget_child_can_focus_get(cur)))
+          return elm_widget_focus_next_get(cur, dir, next);
+     }
 
    /* Return */
    *next = (Evas_Object *)obj;