Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fcitx5-unikey for openSUSE:Factory checked in at 2022-11-06 12:42:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fcitx5-unikey (Old) and /work/SRC/openSUSE:Factory/.fcitx5-unikey.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fcitx5-unikey" Sun Nov 6 12:42:16 2022 rev:3 rq:1033783 version:5.0.11 Changes: -------- --- /work/SRC/openSUSE:Factory/fcitx5-unikey/fcitx5-unikey.changes 2022-03-16 20:23:33.249103582 +0100 +++ /work/SRC/openSUSE:Factory/.fcitx5-unikey.new.2275/fcitx5-unikey.changes 2022-11-06 12:42:34.761516878 +0100 @@ -1,0 +2,13 @@ +Sat Nov 5 01:02:57 UTC 2022 - Tranter Madi <tr...@yandex.com> + +- Backport fix for github issues #23 and #24, add fix-enter.diff and + fix-uou.diff + +------------------------------------------------------------------- +Tue Jul 5 11:29:24 UTC 2022 - Fusion Future <qydwhotm...@gmail.com> + +- Update to 5.0.11 +- Rename unikey.so to libunikey.so +- Add new file libfcitx5-unikey-keymap-editor.so + +------------------------------------------------------------------- Old: ---- fcitx5-unikey-5.0.9.tar.xz New: ---- fcitx5-unikey-5.0.11.tar.xz fix-enter.diff fix-uou.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fcitx5-unikey.spec ++++++ --- /var/tmp/diff_new_pack.A0ifcP/_old 2022-11-06 12:42:36.269525884 +0100 +++ /var/tmp/diff_new_pack.A0ifcP/_new 2022-11-06 12:42:36.277525931 +0100 @@ -17,12 +17,16 @@ Name: fcitx5-unikey -Version: 5.0.9 +Version: 5.0.11 Release: 0 Summary: Unikey engine support for Fcitx5 License: GPL-2.0-or-later AND LGPL-2.0-or-later URL: https://github.com/fcitx/fcitx5-unikey Source: https://download.fcitx-im.org/fcitx5/%{name}/%{name}-%{version}.tar.xz +# Backport https://github.com/fcitx/fcitx5-unikey/issues/24 +Patch1: fix-uou.diff +# Backport https://github.com/fcitx/fcitx5-unikey/issues/23 +Patch2: fix-enter.diff BuildRequires: cmake BuildRequires: extra-cmake-modules BuildRequires: fcitx5-devel @@ -43,6 +47,8 @@ %prep %setup -q +%patch1 -p1 +%patch2 -p1 %build %cmake @@ -56,7 +62,8 @@ %license LICENSES %doc README %dir %{_fcitx5_libdir}/qt5 -%{_fcitx5_libdir}/unikey.so +%{_fcitx5_libdir}/libunikey.so +%{_fcitx5_libdir}/qt5/libfcitx5-unikey-keymap-editor.so %{_fcitx5_addondir}/unikey.conf %{_fcitx5_imconfdir}/unikey.conf %{_datadir}/icons/hicolor/*/apps/fcitx-unikey* ++++++ fcitx5-unikey-5.0.9.tar.xz -> fcitx5-unikey-5.0.11.tar.xz ++++++ ++++ 7786 lines of diff (skipped) ++++++ fix-enter.diff ++++++ diff --git a/src/unikey-im.cpp b/src/unikey-im.cpp index 232d686..5e05551 100644 --- a/src/unikey-im.cpp +++ b/src/unikey-im.cpp @@ -365,6 +365,11 @@ void UnikeyState::preedit(KeyEvent &keyEvent) { (sym >= FcitxKey_Home && sym <= FcitxKey_Insert) || (sym >= FcitxKey_KP_Home && sym <= FcitxKey_KP_Delete)) { handleIgnoredKey(); + + // workaround #23 + keyEvent.filterAndAccept(); + ic_->forwardKey(keyEvent.origKey(), keyEvent.isRelease(), keyEvent.time()); + return; } else if (state.test(KeyState::Super)) { return; ++++++ fix-uou.diff ++++++ diff --git a/unikey/ukengine.cpp b/unikey/ukengine.cpp index e7b6176..55cc1dc 100644 --- a/unikey/ukengine.cpp +++ b/unikey/ukengine.cpp @@ -1267,10 +1267,13 @@ int UkEngine::processHookWithUO(UkKeyEvent &ev) { default: // vneHookAll, vneHookUO: if (v[0] == vnl_u) { if (v[1] == vnl_o || v[1] == vnl_or) { - // uo -> uo+ if prefixed by "th" + // uo -> uo+ if prefixed by "h", "kh", "th", or stand alone if ((vs == vs_uo || vs == vs_uor) && vEnd == m_current && - m_buffer[m_current].form == vnw_cv && - m_buffer[m_current - 2].cseq == cs_th) { + ((m_buffer[m_current].form == vnw_cv && + (m_buffer[m_current - 2].cseq == cs_h || + m_buffer[m_current - 2].cseq == cs_kh || + m_buffer[m_current - 2].cseq == cs_th )) || + m_buffer[m_current].form == vnw_v)) { newVs = vs_uoh; markChange(vStart + 1); m_buffer[vStart + 1].vnSym = vnl_oh; @@ -1904,6 +1907,7 @@ int UkEngine::processAppend(UkKeyEvent &ev) { //---------------------------------------------------------- int UkEngine::appendVowel(UkKeyEvent &ev) { bool autoCompleted = false; + bool complexEvent = false; m_current++; WordInfo &entry = m_buffer[m_current]; @@ -1956,10 +1960,28 @@ int UkEngine::appendVowel(UkKeyEvent &ev) { case vnw_v: case vnw_cv: vs = prev.vseq; + prevTonePos = (m_current - 1) - (VSeqList[vs].len - 1) + getTonePosition(vs, true); tone = m_buffer[prevTonePos].tone; + // u+o/uo+ + u/i -> u+o+ + u/i + if ((vs == vs_uoh || vs == vs_uho) && + (lowerSym == vnl_i || lowerSym == vnl_u)) { + if (vs == vs_uho) { + markChange(m_current - 1); + prev.vnSym = vnl_oh; + prev.vseq = vs_uhoh; + } else { + markChange(m_current - 2); + m_buffer[m_current - 2].vnSym = vnl_uh; + m_buffer[m_current - 2].vseq = vs_uh; + } + + vs = vs_uhoh; + complexEvent = true; + } + if (lowerSym != canSym && tone != 0) // new sym has a tone, but there's // is already a preceeding tone newVs = vs_nil; @@ -2052,6 +2074,10 @@ int UkEngine::appendVowel(UkKeyEvent &ev) { break; } + if (complexEvent) { + return 1; + } + if (!autoCompleted && (m_pCtrl->charsetId != CONV_CHARSET_UNI_CSTRING) && isalpha(entry.keyCode)) { return 0;