6575419: Solaris : XSetICFoucs is not called with Java application at appropriate timing
authornaoto
Thu, 14 Oct 2010 11:37:22 -0700
changeset 6839 1e57288ce186
parent 6838 c101d59707f3
child 6840 51af1a50aec6
6575419: Solaris : XSetICFoucs is not called with Java application at appropriate timing Reviewed-by: okutsu
jdk/src/solaris/classes/sun/awt/X11InputMethod.java
--- a/jdk/src/solaris/classes/sun/awt/X11InputMethod.java	Thu Oct 14 18:46:05 2010 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11InputMethod.java	Thu Oct 14 11:37:22 2010 -0700
@@ -96,6 +96,7 @@
     private Component awtFocussedComponent = null;
     private Component lastXICFocussedComponent = null;
     private boolean   isLastXICActive = false;
+    private boolean   isLastTemporary = false;
     private boolean   isActive = false;
     private boolean   isActiveClient = false;
     private static Map[] highlightStyles;
@@ -349,7 +350,7 @@
            current focussed component, change the XIC focus to the newly
            focussed component.
         */
-        if (lastXICFocussedComponentPeer != awtFocussedComponentPeer ||
+        if (isLastTemporary || lastXICFocussedComponentPeer != awtFocussedComponentPeer ||
             isLastXICActive != haveActiveClient()) {
             if (lastXICFocussedComponentPeer != null) {
                 setXICFocus(lastXICFocussedComponentPeer, false, isLastXICActive);
@@ -401,6 +402,7 @@
         */
         lastXICFocussedComponent = awtFocussedComponent;
         isLastXICActive = isAc;
+        isLastTemporary = isTemporary;
         isActive = false;
     }