On Thu, 12 Dec 2024 10:15:19 GMT, Helly Guo <d...@openjdk.org> wrote:
>> @hellyguo I can't reproduce the problem you're seeing. I configured a Debian >> Bookworm system with Fcitx5 and Pinyin and tested this PR and everything >> worked. The Linux and Fcitx version numbers are the same as yours. I also >> installed fcitx5 on my existing Ubuntu 24.10 system and it worked there, >> also. >> >> The behavior seems a little odd but it matches the behavior of other Linux >> apps (I see Roman letters inserted into the JavaFX TextField until I select >> Chinese text in the IM). In your screen capture the input method window was >> clearly in the wrong location but in my testing it was correctly positioned >> near the JavaFX caret. > > @beldenfox , you are right. > I created a brand new env in virt-manager: > > > virt@virtdeb:~$ uname -a > Linux virtdeb 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 > (2024-11-22) x86_64 GNU/Linux > > virt@virtdeb:~$ cat /etc/os-release > PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" > NAME="Debian GNU/Linux" > VERSION_ID="12" > VERSION="12 (bookworm)" > VERSION_CODENAME=bookworm > ID=debian > HOME_URL="https://www.debian.org/" > SUPPORT_URL="https://www.debian.org/support" > BUG_REPORT_URL="https://bugs.debian.org/" > > virt@virtdeb:~$ java -version > openjdk version "23.0.1" 2024-10-15 > OpenJDK Runtime Environment (build 23.0.1+11-39) > OpenJDK 64-Bit Server VM (build 23.0.1+11-39, mixed mode, sharing) > > virt@virtdeb:~$ fcitx5 -v > 5.0.21 > > > After tested, I found that what you said is true. Forgot what I said, go > ahead. > > Thanks again for your(@tsayao / @beldenfox ) amazing working. > [Screencast from 2024-12-12 > 17-55-44.webm](https://github.com/user-attachments/assets/d2935d8a-9a5a-4603-a9d0-23f59b2b8f4d) Finally, I got the point. Fcitx5 has a setting entry: `Show preedit in application`. If this is on, it works well. If this is off, the value `im_ctx.on_preedit` will get `false` when im(`fcitx5`) finished input-action. Then, the input will not show in the TextField. ![wechat_2024-12-12_193021_345](https://github.com/user-attachments/assets/9cab3844-8166-43fe-b69d-bda00f422e90) ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1080#discussion_r1881903187