naviframe: Move focus from last content to first content by focus next 84/166284/2 accepted/tizen/4.0/unified/20180111.140741 submit/tizen_4.0/20180110.042543 tizen_4.0.IoT.p2_release
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 9 Jan 2018 06:48:32 +0000 (15:48 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 9 Jan 2018 07:27:19 +0000 (16:27 +0900)
Previously, if naviframe focus reaches to the last content, then the
next focus goes to naviframe itself and focus remains the last content.

Now, if naviframe focus reaches to the last content, then the next focus
goes to the first content.

Change-Id: I2bac890cd5953bfe77fee47044b2f86ce7d4c148

src/lib/elc_naviframe.c

index 59274de..5dc90b8 100644 (file)
@@ -1549,7 +1549,8 @@ _elm_naviframe_elm_widget_focus_next(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED
    eina_list_free(l);
 
 end:
-   if (!int_ret)
+   if (!int_ret &&
+       (!(*next) || (*next == elm_object_focused_object_get(obj))))
      {
         *next = obj;
         int_ret = !elm_widget_focus_get(obj);