On Sun, 5 May 2024 10:17:40 GMT, 柳鲲鹏 <d...@openjdk.org> wrote:

>> Candidat box can moving with caret on windows version. Someone must wrote 
>> codes for linux(ubuntu), but it doesn't work, so he didn't commit the codes. 
>> Why it doesn't work, is the key problem.
>> 
>> 1, I wrote a example for linux:
>> https://github.com/quantum6/X11InputMethod
>> 
>> I tried all parameters to test and as my research:
>> If you use XIMPreeditCallbacks to initiate, the box can't be moved with 
>> caret.
>> If you use XIMPreeditNothing, it works.
>> All examples use XIMPreeditCallbacks to initiate input method and candidate 
>> box can't moving. So I understand why he didn't commit the codes.
>> 
>> 2, I traced the route of transfering caret coordites on windows version, 
>> then add codes for linux.
>> 3, Taishan Office(like Microsoft Office Word) is running on jdk, we tested 
>> for a long time, it works OK.
>> 4, I am not sure for AIX( no environment).
>> 
>> 
>> JDK-8264728 : When use chinese IME, the candidate box isn't moved with caret 
>> of JTextArea
>> Type: Bug
>> Component: client-libs
>> Sub-Component: java.awt:i18n
>> Affected Version: 8,9,15,16
>> Priority: P3
>> Status: Open
>> Resolution: Unresolved
>> OS: linux
>> CPU: x86_64
>
> 柳鲲鹏 has updated the pull request with a new target base due to a merge or a 
> rebase. The incremental webrev excludes the unrelated changes brought in by 
> the merge/rebase. The pull request contains 10 additional commits since the 
> last revision:
> 
>  - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6
>  - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6
>  - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6
>  - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6
>  - Update to lastest
>  - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6
>  - Remove tab
>  - Update to latest and make code safer
>  - Merge branch 'master' of https://github.com/openjdk/jdk into quantum6
>  - 8264728: When use chinese IME, the candidate box isn't moved with caret of 
> JTextArea

I tested this fix on Ubuntu 22 and 24 with X11 and Wayland and the fix works 
except for two minor notes:
1. With old IM suggestion window it displayed the text we enter in the choose 
box as well as in the text area itself interactively which allows easy editing 
if you, for example, made a typo - you can use left and right arrows to 
navigate within the entered text and fix the typo. With the new style IM 
suggestion popup there is no visible cursor in the preview string and while it 
is technically possible to navigate with arrows within it to fix typo the lack 
of the cursor makes it much harder.
2. With old IM when you start entering text and dismiss suggestion window with 
escape you will still have the text you entered in the text area. For example 
for Japanese (Mozc) IM with Hiragana input mode when you start typing you get 
hiragana representation in the text area right away and if you press escape the 
hiragana string you entered stays in the editor. With your fix no text appears 
in editor - only in the IM popup and if you press escape the text is gone. I do 
not know if this is intended behavior but it is a change of behavior and needs 
to be discussed.

Also please take time to respond to valid technical requests from @NikitkoCent 
and @alisenchung - even though i like the new way of handling IM more than the 
old one i would hesitate to approve change that has unresolved technical 
questions.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13055#issuecomment-2493016129

Reply via email to