Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't set dummy preedit when switching IM for LibreOffice #172

Merged
merged 2 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "fcitx5"]
path = fcitx5
url = https://github.com/fcitx/fcitx5
url = https://github.com/fcitx-contrib/fcitx5
[submodule "fcitx5-webview"]
path = fcitx5-webview
url = https://github.com/fcitx-contrib/fcitx5-webview
Expand Down
2 changes: 1 addition & 1 deletion fcitx5
5 changes: 4 additions & 1 deletion webpanel/webpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,10 @@ void WebPanel::updateInputPanel(const Text &preedit, const Text &auxUp,

void WebPanel::updateClient(InputContext *ic) {
if (auto macosIC = dynamic_cast<MacosInputContext *>(ic)) {
macosIC->setDummyPreedit(bool(panelShow_));
// Don't set dummy preedit when switching IM. It will clear current cell
// in LibreOffice.
macosIC->setDummyPreedit(bool(panelShow_) &&
!macosIC->inputPanel().transient());
if (!macosIC->isSyncEvent) {
macosIC->commitAndSetPreeditAsync();
}
Expand Down