fcitx / fcitx5-rime

223 stars 22 forks source link

Blinking UI when typing on preedit enabled under Wayland #38

Closed outloudvi closed 2 years ago

outloudvi commented 2 years ago

Reproduction steps:

Other info:

wengxt commented 2 years ago

I assume you're using fcitx 5? See for the reason https://fcitx-im.org/wiki/FAQ#Candidate_window_is_blinking_under_wayland_with_Fcitx_5

Which input method are you referring to ? Actually common Chinese input method are using fixed cursor position. So it tries not to blink as much as possible. We can also fix others too.

outloudvi commented 2 years ago

Thanks for your explanation! I'm actually using RIME with fcitx5 and have set PreeditInApplication=True, and I do noticed that stock pinyin is not having such problems with the same configuration on my side.

wengxt commented 2 years ago

Ok, origianlly I worry about the mismatch of highlight and cursor in rime, but after reading the code in librime, cursor_pos and sel_end is very likely to match with each other, so we can rely on highlight to show the actual cursor position.

wengxt commented 2 years ago

Added an new option to fix the cursor position.

outloudvi commented 2 years ago

Can confirm 332e478a9e4ef7bb4d2a87cd56c11047b11d2f63 provides a fix with PreeditCursorPositionAtBeginning=True, thanks!