7147075: JTextField doesn't get focus or loses focus forever
authorant
Mon, 15 Apr 2013 13:02:31 +0400
changeset 16842 78641211dbbc
parent 16841 5cd8d248ea97
child 16843 21ec7ce3e580
7147075: JTextField doesn't get focus or loses focus forever Reviewed-by: anthony
jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java
--- a/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java	Fri Apr 12 20:39:48 2013 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java	Mon Apr 15 13:02:31 2013 +0400
@@ -1182,8 +1182,8 @@
                             "\nKFM's focused window: " + focusedWindow);
             }
 
-            // See 6522725, 6613426.
-            if (target == realNativeFocusedWindow) {
+            // A workaround for Metacity. See 6522725, 6613426, 7147075.
+            if (target == realNativeFocusedWindow && XWM.getWMID() == XWM.METACITY_WM) {
                 if (focusLog.isLoggable(PlatformLogger.FINE)) {
                     focusLog.fine("The window is already natively focused.");
                 }