From 10f8850727fa069dcd8462b3c5d3ad77f78c49a7 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Fri, 19 Apr 2019 09:59:23 +0800 Subject: [PATCH] Fixes double commit issue with web browser Add patch ibus-hangul-fixes-reset.patch --- ibus-hangul-fixes-reset.patch | 33 +++++++++++++++++++++++++++++++++ ibus-hangul.spec | 8 +++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 ibus-hangul-fixes-reset.patch diff --git a/ibus-hangul-fixes-reset.patch b/ibus-hangul-fixes-reset.patch new file mode 100644 index 0000000..12b919e --- /dev/null +++ b/ibus-hangul-fixes-reset.patch @@ -0,0 +1,33 @@ +commit b3bbd17e5c557463991a6fb193fcfe299817e542 +Author: Peng Wu +Date: Thu Apr 18 15:05:47 2019 +0800 + + Do not commit text when reset signal is received + + ibus-hangul uses ibus_engine_update_preedit_text_with_mode() to + commit the preedit text by ibus-daemon and now focus-out and + mouse click are handled by ibus-daemon and ibus clients. + + BUG=https://github.com/ibus/ibus/issues/1980 + +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 +@@ -1351,7 +1351,16 @@ ibus_hangul_engine_reset (IBusEngine *en + { + IBusHangulEngine *hangul = (IBusHangulEngine *) engine; + ++#if IBUS_CHECK_VERSION(1, 5, 20) ++ // 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); ++#endif + ibus_hangul_engine_flush (hangul); ++ + IBUS_ENGINE_CLASS (parent_class)->reset (engine); + } + diff --git a/ibus-hangul.spec b/ibus-hangul.spec index cf7c6ee..4ef12ce 100644 --- a/ibus-hangul.spec +++ b/ibus-hangul.spec @@ -7,7 +7,7 @@ Name: ibus-hangul Version: 1.5.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: The Hangul engine for IBus input platform License: GPLv2+ URL: https://github.com/libhangul/ibus-hangul @@ -16,6 +16,7 @@ Source0: https://github.com/libhangul/ibus-hangul/releases/download/%{version # not upstreamed patches Patch1: ibus-hangul-setup-abspath.patch Patch2: ibus-hangul-default-hangul-mode.patch +Patch3: ibus-hangul-fixes-reset.patch BuildRequires: gettext-devel, automake, libtool BuildRequires: intltool @@ -40,6 +41,7 @@ libhangul. %setup -q %patch1 -p1 -b .setup-abspath %patch2 -p1 -b .hangul +%patch3 -p1 -b .reset # autopoint -f # AUTOPOINT='intltoolize --automake --copy' autoreconf -fi @@ -116,6 +118,10 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangu %{_datadir}/icons/hicolor/*/apps/* %changelog +* Fri Apr 19 2019 Peng Wu - 1.5.1-5 +- Fixes double commit issue with web browser +- Add patch ibus-hangul-fixes-reset.patch + * Fri Mar 22 2019 Peng Wu - 1.5.1-4 - Change default mode to hangul