src/share/classes/java/awt/Component.java

Print this page

        

@@ -10068,11 +10068,11 @@
             }
             return false;
         }
         Window window = getContainingWindow();
         if (window != null) {
-            if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants()) {
+            if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants() || window.isDisposing()) {
                 if (mixingLog.isLoggable(PlatformLogger.FINE)) {
                     mixingLog.fine("containing window = " + window +
                             "; has h/w descendants = " + window.hasHeavyweightDescendants() +
                             "; has l/w descendants = " + window.hasLightweightDescendants());
                 }