Modified to skip unnecessary screen updates 21/90721/2
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 4 Oct 2016 05:23:30 +0000 (14:23 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 4 Oct 2016 07:36:39 +0000 (00:36 -0700)
Change-Id: I79ee029458526fbeff128bd0b34e1e2e9e5c11a8
Signed-off-by: Ji-hoon Lee <dalton.lee@samsung.com>
src/ise.cpp

index 7f1ee03..8819bff 100644 (file)
@@ -341,6 +341,9 @@ void CCoreEventCallback::on_ise_show(sclint ic, const sclint degree, Ise_Context
     LOGD("Enter\n");
     //g_ise_common->set_keyboard_ise_by_uuid(KEYBD_ISE_UUID);
 
+    /* Don't update screen until all the information is correctly set */
+    g_ui->set_update_pending(TRUE);
+
     ise_reset_context(); // reset ISE
 
     /*if (context.language == ECORE_IMF_INPUT_PANEL_LANG_ALPHABET) {
@@ -366,6 +369,9 @@ void CCoreEventCallback::on_ise_show(sclint ic, const sclint degree, Ise_Context
     }
 
     ::ise_show(ic);
+
+    /* Now we update the whole screen */
+    g_ui->set_update_pending(FALSE);
 }
 
 void CCoreEventCallback::on_ise_hide(sclint ic, const sclchar *ic_uuid)
@@ -1436,15 +1442,16 @@ ise_set_accessibility_state(bool state)
 void
 ise_hide()
 {
-    _language_manager.reset_language(g_config_values.selected_language.c_str());
-
-    _click_count = 0;
-    delete_commit_timer();
-
     if (g_ui) {
+        /* There's no need to update screen when hiding */
+        g_ui->set_update_pending(TRUE);
         g_ui->disable_input_events(TRUE);
         g_ui->hide();
     }
+    _language_manager.reset_language(g_config_values.selected_language.c_str());
+
+    _click_count = 0;
+    delete_commit_timer();
 
     g_keyboard_state.visible_state = FALSE;