JDK-7045354 : Korean IME's Hanja candidate window is not displayed on IMFDemo
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2003
  • CPU: generic
  • Submitted: 2011-05-16
  • Updated: 2011-07-05
  • Resolved: 2011-06-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b145Fixed
Related Reports
Relates :  
Relates :  
Description
SYNOPSIS
--------
Korean IME's Hanja candidate window is not displayed on IMFDemo

OPERATING SYSTEM
----------------
Windows Server 2003 R2 Standard Edition Service Pack 2 for Korean

FULL JDK VERSION
----------------
JDK 7 (tested with b140)
Not reproducible with Java 6

PROBLEM DESCRIPTION
-------------------
Korean IME's Hanja candidate window is not displayed on IMFDemo.

STEPS TO REPRODUCE
------------------
Download IMFDemo program from the following URL, (4. Sample Code)

    http://download.java.net/jdk7/docs/technotes/guides/imf/api-tutorial.html

For Korean IME, please refer to the following URL

    http://support.microsoft.com/kb/130053/en-us

1. Compile and run IMFDemo
2. Move input focus to "active client"
3. Change Hangul input mode from Korean IME's language bar
4. Type "gks", then press Hanja button on Korean IME's language bar.
   Candidate window should be displayed for this action, but nothing happens
5. Press "1", then Hangul is converted to Hanja without candidate window

Comments
EVALUATION reproducible on XP. it's a regression introduced in jdk7 b55 - CR 6806217. there's a problem with AwtComponent::OpenCandidateWindow function. it's more correct to dispatch WM_IME_NOTIFY message to the proxy window. Suggusted fix attached.
23-05-2011

SUGGESTED FIX $ hg diff src/windows/native/sun/windows/awt_Component.cpp diff -r 0b7f41c14605 src/windows/native/sun/windows/awt_Component.cpp --- a/src/windows/native/sun/windows/awt_Component.cpp Mon May 16 18:40:10 2011 +0400 +++ b/src/windows/native/sun/windows/awt_Component.cpp Mon May 23 18:13:34 2011 +0400 @@ -3715,7 +3715,9 @@ void AwtComponent::OpenCandidateWindow(i SetCandidateWindow(iCandType, x-rc.left, y-rc.top); } if (m_bitsCandType != 0) { - ::DefWindowProc(GetHWnd(), WM_IME_NOTIFY, IMN_OPENCANDIDATE, m_bitsCandType); + HWND proxy = GetProxyFocusOwner(); + ::DefWindowProc((proxy != NULL) ? proxy : GetHWnd(), + WM_IME_NOTIFY, IMN_OPENCANDIDATE, m_bitsCandType); } }
23-05-2011

EVALUATION i've just tried to reproduce it with jdk7 b140 and it works fine in my env (Windows 7): screenshot attached - Hanja-when-passed.png there's a number of IME-specific changes went into b142 2David: can you please confirm that the problem exists in b142?
17-05-2011