changeset 5868:cface35aaf24

7147075: JTextField doesn't get focus or loses focus forever Reviewed-by: anthony
author ant
date Mon, 15 Apr 2013 15:20:41 +0400
parents b7a065df19ad
children fe4ada6c96c7
files src/solaris/classes/sun/awt/X11/XDecoratedPeer.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java	Fri Apr 12 15:52:46 2013 +0400
+++ b/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java	Mon Apr 15 15:20:41 2013 +0400
@@ -1139,8 +1139,8 @@
             focusLog.finest("Real native focused window: " + realNativeFocusedWindow +
                             "\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) {
                 focusLog.fine("The window is already natively focused.");
                 return true;
             }