8278472: Invalid value set to CANDIDATEFORM structure

Reviewed-by: phh
Backport-of: 2426d58e592c54de64ebe0f06448d239aeced082
This commit is contained in:
Taizo Kurashige 2025-05-19 13:46:16 +00:00 committed by Paul Hohensee
parent 176d674745
commit 1304a9b0c7

View File

@ -3862,11 +3862,11 @@ void AwtComponent::SetCandidateWindow(int iCandType, int x, int y)
HIMC hIMC = ImmGetContext(hwnd);
if (hIMC) {
CANDIDATEFORM cf;
cf.dwStyle = CFS_POINT;
cf.dwStyle = CFS_CANDIDATEPOS;
ImmGetCandidateWindow(hIMC, 0, &cf);
if (x != cf.ptCurrentPos.x || y != cf.ptCurrentPos.y) {
cf.dwIndex = iCandType;
cf.dwStyle = CFS_POINT;
cf.dwStyle = CFS_CANDIDATEPOS;
cf.ptCurrentPos.x = x;
cf.ptCurrentPos.y = y;
cf.rcArea.left = cf.rcArea.top = cf.rcArea.right = cf.rcArea.bottom = 0;