harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r591027 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/java/common/org/apache/harmony/awt/im/InputMethodContext.java
Date Thu, 01 Nov 2007 14:46:55 GMT
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;



Mime
View raw message