naviframe: Move focus from last content to first content by focus next 85/166285/2 accepted/tizen/unified/20180111.074150 submit/tizen/20180110.035612
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:21:42 +0000 (16:21 +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 12222799421a3aa5cea4348a8dfb9068ff8f3575..0fd683144460c53138e9ed46f5e9c5e8c931abcb 100644 (file)
@@ -1555,7 +1555,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);