Misplaced IME window in 2.4.0

Allan Chain allan-chain at outlook.com
Thu Mar 21 03:31:35 UTC 2024


Hello, LyX developers!

I'm trying out LyX 2.4.0-rc3 (qt6) on KDE6+Wayland, and I'm using fcitx5 
to input CJK characters. I found that the candidate window of the input 
method is always on the top left corner of the window, regardless of the 
cursor position. I think it's a regression since 2.3.7 does not have 
such problem.

After looking into the source code, I found that the position hint 
(Qt::ImCursorRectangle) is only updated when preedit is enabled. 
Although enabling preedit eases the problem, the experience is still not 
very smooth. Specifically, when the position of the cursor is changed, 
for example by clicking, the position hint for the candidate window is 
not immediately updated, and thus the candidate window pops up in a 
wrong position. Only after some keystrokes triggering preedit event that 
the position of the candidate window is correctly updated.

I'm not familiar with LyX codebase, but in my opinion, a better solution 
is to update the position hint for the input method every time the 
cursor position changes.

I'm happy to provide more information to help fixing this.



More information about the lyx-devel mailing list