From: min7.choi Date: Mon, 21 Nov 2016 09:30:17 +0000 (+0900) Subject: Fix, When the language is changed, the window not to do the show and active X-Git-Tag: submit/tizen_3.0/20161122.020037~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9457b85360d208b9d9f412163ffef93a8816a045;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Fix, When the language is changed, the window not to do the show and active Change-Id: I4534f5b13c48fbc916ee2c9ee8f3f92245f9e305 Signed-off-by: min7.choi --- diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index f7b96a7dc..4de717f37 100644 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -220,6 +220,7 @@ WebApplication::WebApplication( : launched_(false), debug_mode_(false), verbose_mode_(false), + lang_changed_mode_(false), ewk_context_( ewk_context_new_with_injected_bundle_path(INJECTED_BUNDLE_PATH)), has_ownership_of_ewk_context_(true), @@ -712,6 +713,7 @@ void WebApplication::OnHardwareKey(WebView* view, const std::string& keyname) { } void WebApplication::OnLanguageChanged() { + lang_changed_mode_ = true; locale_manager_->UpdateSystemLocale(); ewk_context_cache_clear(ewk_context_); auto it = view_stack_.begin(); @@ -854,9 +856,15 @@ void WebApplication::OnRendered(WebView* /*view*/) { LOGGER(DEBUG) << "Rendered"; splash_screen_->HideSplashScreen(SplashScreen::HideReason::RENDERED); - // Show window after frame rendered. - window_->Show(); - window_->Active(); + // Do not show(), active() for language change + if(lang_changed_mode_ == false){ + // Show window after frame rendered. + window_->Show(); + window_->Active(); + } + else{ + lang_changed_mode_ = false; + } } #ifdef MANUAL_ROTATE_FEATURE_SUPPORT diff --git a/runtime/browser/web_application.h b/runtime/browser/web_application.h index 02ca64b3e..9dcaa08fd 100755 --- a/runtime/browser/web_application.h +++ b/runtime/browser/web_application.h @@ -131,6 +131,8 @@ class WebApplication : public WebView::EventListener { int security_model_version_; std::string csp_rule_; std::string csp_report_rule_; + bool lang_changed_mode_; + }; } // namespace runtime