aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-05 16:13:56 +0200
committerSven Gothel <[email protected]>2013-10-05 16:13:56 +0200
commitae103ba597464ca25071950af7afe012e2b86c13 (patch)
tree765cb5ac2342bf044af4d192b5c64a9a27e89eae /src/nativewindow
parent703fcd2a237f26c11421bf3ca85beaca4479c9e2 (diff)
Bug816 OSX CALayer: getLocationOnScreenNonBlocking(..) stop traversing at top-level heavyweight Window, fixes [J]Dialog use case.
Top-level heavyweight Window's position is it's position on screen, hence stop traversing. Thx to Emmanuel Puybaret for pointing this out. Adding Dialog and JDialog unit tests as inspired by Emmanuel Puybaret.
Diffstat (limited to 'src/nativewindow')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
index d9f36901b..069147d26 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
@@ -43,6 +43,7 @@ import com.jogamp.nativewindow.MutableGraphicsConfiguration;
import java.awt.Component;
import java.awt.Container;
+import java.awt.Window;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.applet.Applet;
@@ -598,6 +599,9 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
System.err.println(storage);
}
last = comp;
+ if( comp instanceof Window ) { // top-level heavy-weight ?
+ break;
+ }
comp = comp.getParent();
}
return last;