JDK-4256765 : Can't click-select in City input method lookup window
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt:i18n
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 1999-07-23
  • Updated: 2001-05-04
  • Resolved: 2001-05-04
Related Reports
Duplicate :  
Description
CityInputMethod has code that lets the user select a conversion candidate from the lookup window using the mouse. I think this worked at some point, but it doesn't any more in beta. If you click into the window, it just disappears and nothing else happens.

Comments
SUGGESTED FIX ------- CityInputMethod.java ------- *** /tmp/doL7hq_ Wed Oct 13 18:23:52 1999 --- CityInputMethod.java Wed Oct 13 18:23:31 1999 *************** *** 54,59 **** --- 54,62 ---- // windows - shared by all instances of this input method private static Window statusWindow; + // lookup information - shared by all instances of this input method + private static LookupList currentLookupList; + // lookup information - per instance private String[] lookupCandidates; private Locale[] lookupLocales; *************** *** 148,157 **** statusWindow.setVisible(true); } updateStatusWindow(locale); } public void deactivate(boolean isTemporary) { - closeLookupWindow(); if (!active) { System.out.println("CityInputMethod.deactivate called while not active"); } --- 151,162 ---- statusWindow.setVisible(true); } updateStatusWindow(locale); + if ((currentLookupList != null) && (currentLookupList.context != inputMethodContext)) { + closeLookupWindow(); } + } public void deactivate(boolean isTemporary) { if (!active) { System.out.println("CityInputMethod.deactivate called while not active"); } *************** *** 377,382 **** --- 382,388 ---- void openLookupWindow() { lookupList = new LookupList(this, inputMethodContext, lookupCandidates, lookupLocales, lookupCandidateCount); lookupList.selectCandidate(lookupSelection); + currentLookupList = lookupList; } void closeLookupWindow() { *************** *** 384,389 **** --- 390,396 ---- lookupList.setVisible(false); lookupList = null; } + currentLookupList = null; } }
11-06-2004

EVALUATION In sun.awt.im.InputContext, there is a piece of code to suppress a deactivate() call in case that an InputMethodWindow for that client is about to become visible. But it was changed that the InputMethodWindow does not get activated when it becomes visible, so this code does not work. And if the user clicks the InputMethodWindow (in this case, Lookup window of the CityInputMethod), deactivate() is called and CityInputMethod closes that Lookup window. naoto.satoh@eng 1999-09-22 Changed to close Lookup window of the CityInputMethod in its activate method. naoto.satoh@eng 1999-10-15 Suggested fix is not recommended because Lookup window should be closed on deactivate(). Will be fixed using focus free window. naoto.satoh@eng 1999-10-21 Fixed along with the focus free window implementation. Closed this bug report as a dup of that RFE. naoto.sato@Eng 2001-05-04
21-10-1999