jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuUI.java
changeset 29515 b56181e8ad3c
parent 25859 3317bb8137f4
--- a/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuUI.java	Thu Mar 05 11:07:48 2015 +0300
+++ b/jdk/src/java.desktop/macosx/classes/com/apple/laf/AquaMenuUI.java	Fri Mar 06 16:38:54 2015 +0300
@@ -148,11 +148,15 @@
 
             // In Aqua, we always have a menu delay, regardless of where the menu is.
             if (!(selectedPath.length > 0 && selectedPath[selectedPath.length - 1] == menu.getPopupMenu())) {
-                if (menu.getDelay() == 0) {
-                    appendPath(getPath(), menu.getPopupMenu());
-                } else {
-                    manager.setSelectedPath(getPath());
-                    setupPostTimer(menu);
+                // the condition below prevents from activating menu in other frame
+                if (!menu.isTopLevelMenu() || (selectedPath.length > 0 &&
+                        selectedPath[0] == menu.getParent())) {
+                    if (menu.getDelay() == 0) {
+                        appendPath(getPath(), menu.getPopupMenu());
+                    } else {
+                        manager.setSelectedPath(getPath());
+                        setupPostTimer(menu);
+                    }
                 }
             }
         }