From ae103ba597464ca25071950af7afe012e2b86c13 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 5 Oct 2013 16:13:56 +0200 Subject: 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. --- src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nativewindow') 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; -- cgit v1.2.3