Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fcitx5-m17n for openSUSE:Factory checked in at 2026-02-09 11:43:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fcitx5-m17n (Old) and /work/SRC/openSUSE:Factory/.fcitx5-m17n.new.1670 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fcitx5-m17n" Mon Feb 9 11:43:22 2026 rev:9 rq:1331826 version:5.1.5 Changes: -------- --- /work/SRC/openSUSE:Factory/fcitx5-m17n/fcitx5-m17n.changes 2025-06-23 15:04:47.672536501 +0200 +++ /work/SRC/openSUSE:Factory/.fcitx5-m17n.new.1670/fcitx5-m17n.changes 2026-02-09 11:44:00.411379801 +0100 @@ -1,0 +2,6 @@ +Sun Feb 8 06:29:18 UTC 2026 - Marguerite Su <[email protected]> + +- update to 5.1.5 + * workaround an m17n-lib bug that makes fcitx crash + +------------------------------------------------------------------- Old: ---- fcitx5-m17n-5.1.4.tar.zst New: ---- fcitx5-m17n-5.1.5.tar.zst ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fcitx5-m17n.spec ++++++ --- /var/tmp/diff_new_pack.0TlkZ1/_old 2026-02-09 11:44:01.107409083 +0100 +++ /var/tmp/diff_new_pack.0TlkZ1/_new 2026-02-09 11:44:01.111409251 +0100 @@ -1,7 +1,7 @@ # # spec file for package fcitx5-m17n # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: fcitx5-m17n -Version: 5.1.4 +Version: 5.1.5 Release: 0 Summary: M17n input method engine for Fcitx5 License: LGPL-2.1-or-later ++++++ fcitx5-m17n-5.1.4.tar.zst -> fcitx5-m17n-5.1.5.tar.zst ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-m17n-5.1.4/CMakeLists.txt new/fcitx5-m17n-5.1.5/CMakeLists.txt --- old/fcitx5-m17n-5.1.4/CMakeLists.txt 2025-06-16 08:25:47.000000000 +0200 +++ new/fcitx5-m17n-5.1.5/CMakeLists.txt 2025-10-25 22:31:25.000000000 +0200 @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.6) -project(fcitx-m17n VERSION 5.1.4) +project(fcitx-m17n VERSION 5.1.5) set(REQUIRED_FCITX_VERSION 5.1.13) find_package(ECM REQUIRED 1.0.0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-m17n-5.1.4/im/engine.cpp new/fcitx5-m17n-5.1.5/im/engine.cpp --- old/fcitx5-m17n-5.1.4/im/engine.cpp 2025-06-16 08:25:47.000000000 +0200 +++ new/fcitx5-m17n-5.1.5/im/engine.cpp 2025-10-25 22:31:25.000000000 +0200 @@ -216,7 +216,7 @@ M17NCandidateList(M17NEngine *engine, InputContext *ic) : engine_(engine), ic_(ic) { auto *state = ic_->propertyFor(engine_->factory()); - auto pageSize = GetPageSize(state->mim_->language, state->mim_->name); + auto pageSize = GetPageSize(state->mim()->language, state->mim()->name); const static KeyList selectionKeys{ Key(FcitxKey_1), Key(FcitxKey_2), Key(FcitxKey_3), Key(FcitxKey_4), @@ -224,7 +224,7 @@ Key(FcitxKey_9), Key(FcitxKey_0)}; setPageSize(pageSize); setSelectionKey(selectionKeys); - MPlist *head = state->mic_->candidate_list; + MPlist *head = state->mic()->candidate_list; int index = 0; for (; head && mplist_key(head) != Mnil; head = mplist_next(head)) { MSymbol key = mplist_key(head); @@ -253,10 +253,10 @@ FCITX_M17N_DEBUG() << "Invalid MSymbol: " << msymbol_name(key); } } - if (state->mic_->candidate_index >= 0 && - state->mic_->candidate_index < totalSize()) { - setGlobalCursorIndex(state->mic_->candidate_index); - setPage(state->mic_->candidate_index / pageSize); + if (state->mic()->candidate_index >= 0 && + state->mic()->candidate_index < totalSize()) { + setGlobalCursorIndex(state->mic()->candidate_index); + setPage(state->mic()->candidate_index / pageSize); } } @@ -370,7 +370,7 @@ m17n_object_unref(info); InputMethodEntry entry(uniqueName, fxName, - (strcmp(lang, "t") == 0 ? "*" : lang), "m17n"); + (strcmp(lang, "t") == 0 ? "mul" : lang), "m17n"); entry.setConfigurable(true).setIcon(iconName); entry.setUserData(std::make_unique<M17NData>(mlang, mname)); entries.emplace_back(std::move(entry)); @@ -477,6 +477,9 @@ reinterpret_cast<void *>(&M17NState::callback)); mplist_put(mim_->driver.callback_list, Minput_delete_surrounding_text, reinterpret_cast<void *>(&M17NState::callback)); + } + + if (!mic_ && mim_) { mic_.reset(minput_create_ic(mim_.get(), this)); } @@ -495,12 +498,19 @@ FCITX_M17N_DEBUG() << key << " not my dish"; return false; } + return handleKey(msym); +} + +bool M17NState::handleKey(MSymbol key) { + if (!mic_) { + return false; + } int thru = 0; - if (!minput_filter(mic_.get(), msym, nullptr)) { + if (!minput_filter(mic_.get(), key, nullptr)) { MText *produced = mtext(); // If input symbol was let through by m17n, let Fcitx handle it. // m17n may still produce some text to commit, though. - thru = minput_lookup(mic_.get(), msym, NULL, produced); + thru = minput_lookup(mic_.get(), key, NULL, produced); if (mtext_len(produced) > 0) { auto buf = MTextToUTF8(produced); ic_->commitString(buf); @@ -515,29 +525,31 @@ void M17NState::updateUI() { ic_->inputPanel().reset(); - if (mic_->preedit) { - auto preedit = MTextToUTF8(mic_->preedit); - if (!preedit.empty()) { - SetPreedit(ic_, preedit, mic_->cursor_pos); + if (mic_) { + if (mic_->preedit) { + auto preedit = MTextToUTF8(mic_->preedit); + if (!preedit.empty()) { + SetPreedit(ic_, preedit, mic_->cursor_pos); + } + FCITX_M17N_DEBUG() << "IM preedit changed to " << preedit; } - FCITX_M17N_DEBUG() << "IM preedit changed to " << preedit; - } - ic_->updatePreedit(); - if (mic_->status) { - auto mstatus = MTextToUTF8(mic_->status); - // toShow = toShow || (strlen(mstatus) != 0); - if (!mstatus.empty()) { - FCITX_M17N_DEBUG() << "IM status changed to " << mstatus; + if (mic_->status) { + auto mstatus = MTextToUTF8(mic_->status); + // toShow = toShow || (strlen(mstatus) != 0); + if (!mstatus.empty()) { + FCITX_M17N_DEBUG() << "IM status changed to " << mstatus; + } } - } - if (mic_->candidate_list && mic_->candidate_show) { - auto candList = std::make_unique<M17NCandidateList>(engine_, ic_); - if (candList->size()) { - candList->setGlobalCursorIndex(mic_->candidate_index); - ic_->inputPanel().setCandidateList(std::move(candList)); + if (mic_->candidate_list && mic_->candidate_show) { + auto candList = std::make_unique<M17NCandidateList>(engine_, ic_); + if (candList->size()) { + candList->setGlobalCursorIndex(mic_->candidate_index); + ic_->inputPanel().setCandidateList(std::move(candList)); + } } } + ic_->updatePreedit(); ic_->updateUserInterface(UserInterfaceComponent::InputPanel); } @@ -545,15 +557,17 @@ if (!mic_) { return; } - minput_reset_ic(mic_.get()); + mic_.reset(); updateUI(); } -void M17NState::commitPreedit() const { +void M17NState::commitPreedit() { if (!mic_) { return; } + // Per minput_reset_ic comment, sending Mnil should commit the preedit. + handleKey(Mnil); if (!mic_->preedit) { return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-m17n-5.1.4/im/engine.h new/fcitx5-m17n-5.1.5/im/engine.h --- old/fcitx5-m17n-5.1.4/im/engine.h 2025-06-16 08:25:47.000000000 +0200 +++ new/fcitx5-m17n-5.1.5/im/engine.h 2025-10-25 22:31:25.000000000 +0200 @@ -58,11 +58,17 @@ void updateUI(); void select(int index); void reset(); - void commitPreedit() const; + void commitPreedit(); bool keyEvent(const Key &key); static void callback(MInputContext *context, MSymbol command); + MInputMethod *mim() const { return mim_.get(); } + MInputContext *mic() const { return mic_.get(); } + +private: + bool handleKey(MSymbol key); + M17NEngine *engine_; InputContext *ic_; std::unique_ptr<MInputMethod, decltype(&minput_close_im)> mim_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-m17n-5.1.4/org.fcitx.Fcitx5.Addon.M17N.metainfo.xml.in new/fcitx5-m17n-5.1.5/org.fcitx.Fcitx5.Addon.M17N.metainfo.xml.in --- old/fcitx5-m17n-5.1.4/org.fcitx.Fcitx5.Addon.M17N.metainfo.xml.in 2025-06-16 08:25:47.000000000 +0200 +++ new/fcitx5-m17n-5.1.5/org.fcitx.Fcitx5.Addon.M17N.metainfo.xml.in 2025-10-25 22:31:25.000000000 +0200 @@ -14,6 +14,7 @@ <url type="vcs-browser">https://github.com/fcitx/fcitx5-m17n</url> <project_group>Fcitx</project_group> <releases> + <release version="5.1.5" date="2025-10-16"/> <release version="5.1.4" date="2025-06-15"/> <release version="5.1.3" date="2025-01-22"/> <release version="5.1.2" date="2024-10-08"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-m17n-5.1.4/po/LINGUAS new/fcitx5-m17n-5.1.5/po/LINGUAS --- old/fcitx5-m17n-5.1.4/po/LINGUAS 2025-06-16 08:25:47.000000000 +0200 +++ new/fcitx5-m17n-5.1.5/po/LINGUAS 2025-10-25 22:31:25.000000000 +0200 @@ -2,6 +2,7 @@ ca da de +fr he ja ko diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-m17n-5.1.4/po/fr.po new/fcitx5-m17n-5.1.5/po/fr.po --- old/fcitx5-m17n-5.1.4/po/fr.po 1970-01-01 01:00:00.000000000 +0100 +++ new/fcitx5-m17n-5.1.5/po/fr.po 2025-10-25 22:31:25.000000000 +0200 @@ -0,0 +1,87 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the fcitx5-m17n package. +# +# Translators: +# Popolon_Github, 2025 +# +msgid "" +msgstr "" +"Project-Id-Version: fcitx5-m17n\n" +"Report-Msgid-Bugs-To: [email protected]\n" +"POT-Creation-Date: 2025-09-12 20:24+0000\n" +"PO-Revision-Date: 2017-12-21 01:32+0000\n" +"Last-Translator: Popolon_Github, 2025\n" +"Language-Team: French (https://app.transifex.com/fcitx/teams/12005/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % " +"1000000 == 0 ? 1 : 2;\n" + +#: im/i18nname.cpp:15 +msgid "Anthy" +msgstr "Anthy" + +#: im/i18nname.cpp:13 +msgid "Cangjie" +msgstr "Cangjie" + +#: im/i18nname.cpp:13 +msgid "Chewing Symbol" +msgstr "Symbole Chewing" + +#: im/engine.h:33 +msgid "Enable Deprecated" +msgstr "Activer les dépréciés " + +#: im/i18nname.cpp:15 +msgid "Hanja" +msgstr "Hanja" + +#: im/i18nname.cpp:14 +msgid "Keyboard" +msgstr "Clavier" + +#: im/m17n.conf.in.in:2 +msgid "M17N" +msgstr "M17N" + +#: im/m17n.conf.in.in:3 +msgid "M17N IM Support For Fcitx" +msgstr "Support M17N IM pour Fcitx" + +#: org.fcitx.Fcitx5.Addon.M17N.metainfo.xml.in:8 +msgid "M17N Input method" +msgstr "Méthode de saisie m17n" + +#: org.fcitx.Fcitx5.Addon.M17N.metainfo.xml.in:7 +msgid "M17N for Fcitx 5" +msgstr "M17N pour Fcitx 5" + +#: im/i18nname.cpp:14 +msgid "Pinyin" +msgstr "Pinyin" + +#. remember to update "default" in the same directory. +#: im/i18nname.cpp:13 +msgid "Pinyin Symbol" +msgstr "Symbol Pinyin" + +#: im/i18nname.cpp:16 +msgid "Quick" +msgstr "Quick" + +#: im/i18nname.cpp:15 +msgid "Romaja" +msgstr "Romaja" + +#: im/i18nname.cpp:14 +msgid "Tone Pinyin" +msgstr "Pinyin avec tons" + +#: im/engine.cpp:353 +#, c++-format +msgid "{0} (M17N)" +msgstr "{0} (M17N)" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcitx5-m17n-5.1.4/test/testm17n.cpp new/fcitx5-m17n-5.1.5/test/testm17n.cpp --- old/fcitx5-m17n-5.1.4/test/testm17n.cpp 2025-06-16 08:25:47.000000000 +0200 +++ new/fcitx5-m17n-5.1.5/test/testm17n.cpp 2025-10-25 22:31:25.000000000 +0200 @@ -16,12 +16,13 @@ #include <fcitx/inputcontextmanager.h> #include <fcitx/inputmethodgroup.h> #include <fcitx/inputmethodmanager.h> +#include <fcitx/inputpanel.h> #include <fcitx/instance.h> #include <string> using namespace fcitx; -void scheduleEvent(Instance *instance) { +void testWijesekara(Instance *instance) { instance->eventDispatcher().schedule([instance]() { auto *m17n = instance->addonManager().addon("m17n", true); FCITX_ASSERT(m17n); @@ -68,10 +69,53 @@ uuid, Key(FcitxKey_braceright), false); testfrontend->call<ITestFrontend::keyEvent>(uuid, Key("Control+space"), false); + delete ic; }); } -void runInstance() {} +void testSwitchWithUnicode(Instance *instance) { + instance->eventDispatcher().schedule( + [instance]() { + auto *m17n = instance->addonManager().addon("m17n", true); + FCITX_ASSERT(m17n); + auto defaultGroup = instance->inputMethodManager().currentGroup(); + std::string wijesekaraName; + if (!instance->inputMethodManager().entry("m17n_zh_pinyin") || + !instance->inputMethodManager().entry("m17n_zh_bopomofo")) { + FCITX_ERROR() + << "wijesekara engine is not available, skip the test"; + return; + } + defaultGroup.inputMethodList().clear(); + defaultGroup.inputMethodList().push_back( + InputMethodGroupItem("keyboard-us")); + defaultGroup.inputMethodList().push_back( + InputMethodGroupItem("m17n_zh_pinyin")); + defaultGroup.inputMethodList().push_back( + InputMethodGroupItem("m17n_zh_bopomofo")); + defaultGroup.setDefaultInputMethod("m17n_zh_pinyin"); + instance->inputMethodManager().setGroup(defaultGroup); + auto *testfrontend = instance->addonManager().addon("testfrontend"); + auto uuid = testfrontend->call<ITestFrontend::createInputContext>( + "testapp"); + auto ic = instance->inputContextManager().findByUUID(uuid); + ic->focusIn(); + instance->activate(); + FCITX_ASSERT(instance->inputMethod(ic) == "m17n_zh_pinyin"); + testfrontend->call<ITestFrontend::keyEvent>(uuid, Key("Control+u"), + false); + const auto commitPreedit = ic->inputPanel().preedit().toString(); + if (!commitPreedit.empty()) { + testfrontend->call<ITestFrontend::pushCommitExpectation>( + commitPreedit); + } + instance->setCurrentInputMethod(ic, "m17n_zh_bopomofo", false); + FCITX_ASSERT(instance->inputMethod(ic) == "m17n_zh_bopomofo"); + testfrontend->call<ITestFrontend::pushCommitExpectation>("a"); + testfrontend->call<ITestFrontend::keyEvent>(uuid, Key("a"), false); + delete ic; + }); +} int main() { setupTestingEnvironment(TESTING_BINARY_DIR, {"bin"}, @@ -84,7 +128,8 @@ fcitx::Log::setLogRule("default=5,m17n=5"); Instance instance(FCITX_ARRAY_SIZE(argv), argv); instance.addonManager().registerDefaultLoader(nullptr); - scheduleEvent(&instance); + testWijesekara(&instance); + testSwitchWithUnicode(&instance); instance.eventDispatcher().schedule([&instance]() { instance.exit(); }); instance.exec();
