<AWT Dev> [9] request for review: 8076455: IME Composition Window is displayed on incorrect position

Andrew Brygin andrew.brygin at oracle.com
Fri Apr 17 09:31:12 UTC 2015


Hello,

  could you please review a fix for CR 8076455?

Bug: https://bugs.openjdk.java.net/browse/JDK-8076455
Webrev: http://cr.openjdk.java.net/~bae/8076455/9/webrev.00/

  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
  and bottom.

  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:
  https://bugs.openjdk.java.net/secure/attachment/27224/SimpleTest.java

  Here is no automated regression test, because it requires a system
  with configured IM.

  Please take a look.

Thanks,
Andrew.


More information about the awt-dev mailing list