Skip to content

Commit

Permalink
fix: don't set dummy preedit when switching IM for LibreOffice (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored Jul 13, 2024
1 parent 48f1dbe commit 5ffb9bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
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

0 comments on commit 5ffb9bf

Please sign in to comment.