Skip to content

Commit

Permalink
fix(linux):fix fcitx input method wrong positioning (#955)
Browse files Browse the repository at this point in the history
* fix(linux):fix fcitx input method wrong positioning

* remove unsafe
  • Loading branch information
33671 authored May 22, 2023
1 parent f723025 commit f7dded4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changes/fix_fcitxPositioning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"wry": patch
---

The bug was reported in tauri repo: https://github.com/tauri-apps/tauri/issues/5986

With input method preedit disabled,fcitx can anchor at edit cursor position.
the pre-edit text will not disappear,instead it shows in the fcitx selection window below the input area.
5 changes: 5 additions & 0 deletions src/webview/webkitgtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ impl InnerWebView {
webview.build()
};

// Disable input preedit,fcitx input editor can anchor at edit cursor position
if let Some(input_context) = webview.input_method_context() {
input_context.set_enable_preedit(false);
}

web_context.register_automation(webview.clone());

// Message handler
Expand Down

0 comments on commit f7dded4

Please sign in to comment.