Fix, When the language is changed, the window not to do the show and active 77/98977/2
authormin7.choi <min7.choi@samsung.com>
Mon, 21 Nov 2016 09:30:17 +0000 (18:30 +0900)
committermin7.choi <min7.choi@samsung.com>
Mon, 21 Nov 2016 10:07:42 +0000 (19:07 +0900)
Change-Id: I4534f5b13c48fbc916ee2c9ee8f3f92245f9e305
Signed-off-by: min7.choi <min7.choi@samsung.com>
runtime/browser/web_application.cc
runtime/browser/web_application.h

index f7b96a7..4de717f 100644 (file)
@@ -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
index 02ca64b..9dcaa08 100755 (executable)
@@ -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