Blame SOURCES/ibus-hangul-fixes-reset.patch

857ed0
commit b3bbd17e5c557463991a6fb193fcfe299817e542
857ed0
Author: Peng Wu <alexepico@gmail.com>
857ed0
Date:   Thu Apr 18 15:05:47 2019 +0800
857ed0
857ed0
    Do not commit text when reset signal is received
857ed0
    
857ed0
    ibus-hangul uses ibus_engine_update_preedit_text_with_mode() to
857ed0
    commit the preedit text by ibus-daemon and now focus-out and
857ed0
    mouse click are handled by ibus-daemon and ibus clients.
857ed0
    
857ed0
    BUG=https://github.com/ibus/ibus/issues/1980
857ed0
857ed0
Index: ibus-hangul-1.4.2/src/engine.c
857ed0
===================================================================
857ed0
--- ibus-hangul-1.4.2.orig/src/engine.c
857ed0
+++ ibus-hangul-1.4.2/src/engine.c
857ed0
@@ -1197,7 +1197,14 @@ ibus_hangul_engine_reset (IBusEngine *en
857ed0
 {
857ed0
     IBusHangulEngine *hangul = (IBusHangulEngine *) engine;
857ed0
 
857ed0
+    // ibus-hangul uses
857ed0
+    // ibus_engine_update_preedit_text_with_mode() function which makes
857ed0
+    // the preedit string committed automatically when the reset is received
857ed0
+    // So we don't need to commit the preedit here.
857ed0
+    hangul_ic_reset (hangul->context);
857ed0
+    ustring_clear (hangul->preedit);
857ed0
     ibus_hangul_engine_flush (hangul);
857ed0
+
857ed0
     parent_class->reset (engine);
857ed0
 }
857ed0