Fix Bantam Apps menu entry, st XIM focus, and fcitx5-t9 InputContextDestroyed crash
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user