You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ay...@apache.org on 2007/11/01 15:46:55 UTC
svn commit: r591027 -
/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/InputMethodContext.java
Author: ayza
Date: Thu Nov 1 07:46:54 2007
New Revision: 591027
URL: http://svn.apache.org/viewvc?rev=591027&view=rev
Log:
Applying the patch from HARMONY-4963 ([classlib][awt] possible hang up when activate windows-InputMethod if getInputMethodRequests() is overridden)
Modified:
harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/InputMethodContext.java
Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/InputMethodContext.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/InputMethodContext.java?rev=591027&r1=591026&r2=591027&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/InputMethodContext.java (original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/InputMethodContext.java Thu Nov 1 07:46:54 2007
@@ -156,6 +156,8 @@
}
private void activateIM(InputMethod im) {
+ Component c;
+
im.activate();
if ((nativeIM != null) && (im != nativeIM)) {
// when Java IM is active
@@ -164,6 +166,11 @@
nativeIM.disableIME();
}
IMManager.setLastActiveIMC(this);
+
+ c = getClient();
+ if (c != null) {
+ c.getInputMethodRequests();
+ }
}
@SuppressWarnings("deprecation")
@@ -313,10 +320,13 @@
if (newIM != null) {
closeIM(inputMethod);
client = KeyboardFocusManager.
- getCurrentKeyboardFocusManager().getFocusOwner();
+ getCurrentKeyboardFocusManager().getFocusOwner();
+ if (client != null) {
+ client.getInputMethodRequests();
+ }
initIM(newIM, locale);
inputMethod = newIM;
-
+
return true;
}
return false;