<AWT Dev>  request for review: 8076455: IME Composition Window is displayed on incorrect position
andrew.brygin at oracle.com
Fri Apr 17 09:31:12 UTC 2015
could you please review a fix for CR 8076455?
The problem with position of IME candidate window is caused by
incorrect calculation of relative coordinates which are supplied
to ImmSetCandidateWindow() routine: even in the case of lightweight
components we are translating the screen coordinates of desired
position relatively to the frame location, whereas it has to be
done relatively to upper left corner of the client area.
As a result, we have got IME candidate window shifted to right
For a case when a lightweight component is inserted into a heavyweight
container the result is even worse, because we are calculate the
candidate window position relatively to the heavyweight container
position, but process IME messages in a toplevel frame, what makes
these relative coordinates completely wrong.
Suggested solution is to use screen coordinates of a toplevel frame
in order to get relative position of IME candidate window.
A simplified test case that demonstrates the problem is attached to
the bug record:
Here is no automated regression test, because it requires a system
with configured IM.
Please take a look.
More information about the awt-dev