RFR: 8264728: When use chinese IME, the candidate box isn't moved with caret of JTextArea [v11]
Nikita Provotorov
duke at openjdk.org
Wed May 8 16:07:04 UTC 2024
On Sun, 5 May 2024 10:17:40 GMT, 柳鲲鹏 <duke at 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
The main problem with this patch is that it uses a combination of `XIMPreeditCallbacks` input style + manipulations over the `XNSpotLocation` property, although Xlib's docs clearly states:
> The XNSpotLocation argument specifies to the input method the coordinates of the spot to be used by an input method executing with XNInputStyle set to XIMPreeditPosition. **_When specified to any input method other than XIMPreeditPosition, this XIC value is ignored._**
So, although the patch works on some distributions with some Xlib's version and some IM engines, there's no guarantee that the patch will work on any other combination of distribution+Xlib+IM
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13055#issuecomment-2100914601
More information about the client-libs-dev
mailing list