Fix Bantam Apps menu entry, st XIM focus, and fcitx5-t9 InputContextDestroyed crash

This commit is contained in:
Luxferre
2026-10-22 16:10:56 +03:00
parent 6e58218e10
commit 4e503d0654
13 changed files with 49 additions and 16 deletions
+11 -7
View File
@@ -267,11 +267,10 @@ T9Engine::T9Engine(fcitx::Instance* instance)
fcitx::EventType::InputContextDestroyed,
fcitx::EventWatcherPhase::PreInputMethod,
[this](fcitx::Event& event) {
auto& icEvent = static_cast<fcitx::InputContextEvent&>(event);
if (auto* ic = icEvent.inputContext()) {
if (auto* state = ic->propertyFor(&factory)) {
state->onFocusChange();
}
FCITX_UNUSED(event);
if (sharedMode == T9Mode::Ctrl) {
sharedMode = T9Mode::Lower;
writeStatusIndicator("[abc]");
}
});
writeStatusIndicator("[abc]");
@@ -938,9 +937,14 @@ void T9State::cancelCommit() {
}
void T9State::resetUI() {
if (!ic) {
return;
}
ic->inputPanel().reset();
ic->updatePreedit();
ic->updateUserInterface(fcitx::UserInterfaceComponent::InputPanel);
if (ic->hasFocus()) {
ic->updatePreedit();
ic->updateUserInterface(fcitx::UserInterfaceComponent::InputPanel);
}
}
void T9State::showStatusBanner(const std::string& msg) {