diff --git a/SOURCES/ibus-hangul-fixes-reset-signal.patch b/SOURCES/ibus-hangul-fixes-reset-signal.patch new file mode 100644 index 0000000..0116beb --- /dev/null +++ b/SOURCES/ibus-hangul-fixes-reset-signal.patch @@ -0,0 +1,42 @@ +Index: ibus-hangul-1.5.1/src/engine.c +=================================================================== +--- ibus-hangul-1.5.1.orig/src/engine.c ++++ ibus-hangul-1.5.1/src/engine.c +@@ -22,6 +22,7 @@ + #include + #endif + ++#include + #include + #include + #include +@@ -217,6 +218,11 @@ static int initial_input_mode = INPUT_MO + * whether to use event forwarding workaround + */ + static gboolean use_event_forwarding = TRUE; ++/** ++ * whether to use client commit ++ * See: https://github.com/libhangul/ibus-hangul/pull/68 ++ */ ++static gboolean use_client_commit = TRUE; + + static glong + ucschar_strlen (const ucschar* str) +@@ -1351,7 +1357,17 @@ ibus_hangul_engine_reset (IBusEngine *en + { + IBusHangulEngine *hangul = (IBusHangulEngine *) engine; + ++ if (use_client_commit) { ++ // ibus-hangul uses ++ // ibus_engine_update_preedit_text_with_mode() function which makes ++ // the preedit string committed automatically when the reset is received ++ // So we don't need to commit the preedit here. ++ hangul_ic_reset (hangul->context); ++ ustring_clear (hangul->preedit); ++ } ++ + ibus_hangul_engine_flush (hangul); ++ + IBUS_ENGINE_CLASS (parent_class)->reset (engine); + } + diff --git a/SPECS/ibus-hangul.spec b/SPECS/ibus-hangul.spec index 018ee27..9e4e3e9 100644 --- a/SPECS/ibus-hangul.spec +++ b/SPECS/ibus-hangul.spec @@ -3,7 +3,7 @@ Name: ibus-hangul Version: 1.5.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Hangul engine for IBus input platform License: GPLv2+ Group: System Environment/Libraries @@ -12,6 +12,8 @@ Source0: https://github.com/libhangul/ibus-hangul/releases/download/%{version # not upstreamed patches Patch1: ibus-hangul-setup-abspath.patch +# patch from upstream +Patch2: ibus-hangul-fixes-reset-signal.patch BuildRequires: gettext-devel, automake, libtool BuildRequires: intltool @@ -35,6 +37,7 @@ libhangul. %prep %setup -q %patch1 -p1 -b .setup-abspath +%patch2 -p1 -b .reset # autopoint -f # AUTOPOINT='intltoolize --automake --copy' autoreconf -fi @@ -111,6 +114,11 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangu %{_datadir}/icons/hicolor/*/apps/* %changelog +* Tue Dec 3 2019 Peng Wu - 1.5.1-5 +- Fixes reset signal +- Add ibus-hangul-fixes-reset-signal.patch +- Resolves: #1661079 + * Thu Sep 20 2018 Tomas Orsava - 1.5.1-4 - Require the Python interpreter directly instead of using the package name - Related: rhbz#1619153