Modified not to update screen when hidden 62/74762/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 8 Jun 2016 05:44:02 +0000 (14:44 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 14 Jun 2016 06:49:34 +0000 (15:49 +0900)
Change-Id: I95cd54101d4a6327b4a0820d2105d0267157856b

scl/scluiimpl.cpp

index ca9f97b..7651585 100644 (file)
@@ -1068,7 +1068,13 @@ CSCLUIImpl::set_cur_sublayout(const sclchar *sub_layout_name)
         CSCLWindows *windows = CSCLWindows::get_instance();
         if (context && windows) {
             ret = context->set_cur_sublayout(sub_layout_name);
-            windows->update_window(windows->get_base_window());
+            SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+            if (window_context) {
+                if (!(window_context->hidden)) {
+                    /* Update main window only when it is in visible state */
+                    windows->update_window(windows->get_base_window());
+                }
+            }
         }
     }
     return ret;
@@ -1106,7 +1112,13 @@ CSCLUIImpl::set_string_substitution(const sclchar *original, const sclchar *subs
         CSCLResourceCache *cache = CSCLResourceCache::get_instance();
         if (cache && windows) {
             cache->set_string_substitution(original, substitute);
-            windows->update_window(windows->get_base_window());
+            SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+            if (window_context) {
+                if (!(window_context->hidden)) {
+                    /* Update main window only when it is in visible state */
+                    windows->update_window(windows->get_base_window());
+                }
+            }
         }
     }
 }
@@ -1119,7 +1131,13 @@ CSCLUIImpl::unset_string_substitution(const sclchar *original)
         CSCLResourceCache *cache = CSCLResourceCache::get_instance();
         if (cache && windows) {
             cache->unset_string_substitution(original);
-            windows->update_window(windows->get_base_window());
+            SclWindowContext *window_context = windows->get_window_context(windows->get_base_window());
+            if (window_context) {
+                if (!(window_context->hidden)) {
+                    /* Update main window only when it is in visible state */
+                    windows->update_window(windows->get_base_window());
+                }
+            }
         }
     }
 }