Fix double commit issue in hangul temporarily 42/71042/4
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 24 May 2016 00:52:25 +0000 (09:52 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 24 May 2016 00:55:05 +0000 (09:55 +0900)
commit is performed twice by immodule and IMEngine in wayland environment due to asynchronous wayland protocol.

Change-Id: I0de8848693f160d89bf8b4a19a44f4e4e51c6c9a

src/scim_hangul_imengine.cpp

index 2defad7..c83b3b1 100644 (file)
@@ -645,7 +645,16 @@ void
 HangulInstance::reset()
 {
     SCIM_DEBUG_IMENGINE(2) << "reset.\n";
-    flush();
+
+    hide_preedit_string();
+
+    WideString wstr = m_preedit;
+    const ucschar *str = hangul_ic_flush(m_hic);
+    while (*str != 0)
+        wstr.push_back (*str++);
+
+    delete_candidates ();
+    m_preedit.clear();
 }
 
 void