Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
8278472: Invalid value set to CANDIDATEFORM structure
Backport-of: 2426d58e592c54de64ebe0f06448d239aeced082
  • Loading branch information
aivanov-jdk committed Jan 28, 2022
1 parent bb5bc6a commit cd5a9a9
Showing 1 changed file with 3 additions and 3 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -3917,11 +3917,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, y};
cf.rcArea = {0, 0, 0, 0};
ImmSetCandidateWindow(hIMC, &cf);
Expand Down

1 comment on commit cd5a9a9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.