Fixes double commit issue with web browser

Add patch ibus-hangul-fixes-reset.patch
This commit is contained in:
Peng Wu 2019-04-19 09:59:23 +08:00
parent 16f71de138
commit 10f8850727
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,33 @@
commit b3bbd17e5c557463991a6fb193fcfe299817e542
Author: Peng Wu <alexepico@gmail.com>
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);
}

View File

@ -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 <pwu@redhat.com> - 1.5.1-5
- Fixes double commit issue with web browser
- Add patch ibus-hangul-fixes-reset.patch
* Fri Mar 22 2019 Peng Wu <pwu@redhat.com> - 1.5.1-4
- Change default mode to hangul