From 32250a41ffe815832a6fc39eebc482c02e03780b Mon Sep 17 00:00:00 2001 From: Seechan Kim Date: Mon, 20 Dec 2021 19:35:23 +0900 Subject: [PATCH] Fix to move to the previous page when pressing back key Change-Id: Ie1a275ee7c12f40d9cbbf77ef17934db929c137a --- packaging/oauth2.spec | 2 +- src/oauth2_manager.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packaging/oauth2.spec b/packaging/oauth2.spec index 4245941..62385d5 100644 --- a/packaging/oauth2.spec +++ b/packaging/oauth2.spec @@ -1,6 +1,6 @@ Name: oauth2 Summary: Tizen oauth 2.0 Framework -Version: 0.0.6 +Version: 0.0.7 Release: 1 Group: Social & Content/API License: Apache-2.0 diff --git a/src/oauth2_manager.c b/src/oauth2_manager.c index 9a50214..1494d6a 100755 --- a/src/oauth2_manager.c +++ b/src/oauth2_manager.c @@ -287,6 +287,12 @@ __handle_back_key(void *data, Evas_Object *p, void *info) { if (data) { oauth2_manager_s *mgr_handle = (oauth2_manager_s *)data; + + if (ewk_view_back_possible(mgr_handle->ewk_view)) { + OAUTH2_LOG_I("on_web_url_page_back"); + ewk_view_back(mgr_handle->ewk_view); + return; + } __convert_tizen_error_to_oauth_error( OAUTH2_ERROR_USER_CANCELLED, "User cancelled the operation", @@ -431,8 +437,11 @@ __exit_back_cb(void *data, Evas_Object *p, void *info) { if (data) { oauth2_manager_s *mgr_handle = (oauth2_manager_s *)data; - evas_object_hide(mgr_handle->ewk_view); - evas_object_hide(mgr_handle->login_win); + OAUTH2_LOG_I("__exit_back_cb is_active=%d", mgr_handle->is_active); + if (mgr_handle->is_active == FALSE) { + evas_object_hide(mgr_handle->ewk_view); + evas_object_hide(mgr_handle->login_win); + } } } -- 2.7.4