[jdk18] RFR: 8278472: Invalid value set to CANDIDATEFORM structure

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Thu Jan 6 10:05:24 UTC 2022


On Tue, 21 Dec 2021 15:18:40 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> According to the Windows API reference, `dwStyle` of [`CANDIDATEFORM`](https://docs.microsoft.com/en-us/windows/win32/api/imm/ns-imm-candidateform) structure should be set to `CFS_CANDIDATEPOS` or `CFS_EXCLUDE`. So, `CFS_POINT` is wrong here.
> 
> There are two instances in `AwtComponent::SetCandidateWindow` in [`awt_Component.cpp`](https://github.com/openjdk/jdk/blob/f90425a1cbbc686045c87086af586e62f05f6c49/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp#L3914) where the incorrect value is used.
> 
> I've created the PR for jdk18 as it's a low-risk fix. If it's inappropriate at this time, I'll open the PR for mainline jdk.

It looks reasonable to me.. But for confidence, did you check if JDK-8147842, JDK-8184016 and  JDK-8183504 still behaves properly.
Also, I guess since ATR is almost done, I think it will be more apt to place this PR on the mainline

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

PR: https://git.openjdk.java.net/jdk18/pull/54



More information about the client-libs-dev mailing list