diff options
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java | 20 | ||||
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java | 4 |
2 files changed, 21 insertions, 3 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java index b20007d53..844b17469 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/JAWTUtil.java @@ -152,7 +152,7 @@ public class JAWTUtil { * CALayer position needs to be derived from AWT position * in relation to super CALayer. * <p> - * AWT's super-calayer, i.e. the AWT's own component CALayer, + * AWT's super-calayer, i.e. the AWT top-container's CALayer, * does not layout our root-calayer in respect to this component's * position and size, at least when resizing programmatically. * </p> @@ -164,6 +164,24 @@ public class JAWTUtil { * The super-calayer bounds exclude the frame's heavyweight border/insets. * </p> * <p> + * The super-calayer lies within the AWT top-container client space (content). + * </p> + * <p> + * Component's location in super-calayer: + * <pre> + p0 = c.locationOnScreen(); + p0 -= c.getOutterComp.getPos(); + p0 -= c.getOutterComp.getInsets(); + * </pre> + * Where 'locationOnScreen()' is: + * <pre> + p0 = 0/0; + while( null != c ) { + p0 += c.getPos(); + } + * </pre> + * </p> + * <p> * This flags also sets {@link #JAWT_OSX_CALAYER_QUIRK_SIZE}, * i.e. they are related. * </p> diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java index 833e6cd24..2eff1bc09 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java +++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java @@ -110,7 +110,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { // AWT position is top-left w/ insets, where CALayer position is bottom/left from root CALayer w/o insets. // Determine p0: components location on screen w/o insets. // CALayer position will be determined in native code. - // See: {@link JAWTWindow#JAWT_OSX_CALAYER_QUIRK_LAYOUT} + // See detailed description in {@link JAWTUtil#JAWT_OSX_CALAYER_QUIRK_LAYOUT} final Point p0 = new Point(); final Component outterComp = getLocationOnScreenNonBlocking(p0, component); final java.awt.Insets outterInsets = AWTMisc.getInsets(outterComp, true); @@ -141,7 +141,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface { // AWT position is top-left w/ insets, where CALayer position is bottom/left from root CALayer w/o insets. // Determine p0: components location on screen w/o insets. // CALayer position will be determined in native code. - // See: {@link JAWTWindow#JAWT_OSX_CALAYER_QUIRK_LAYOUT} + // See detailed description in {@link JAWTUtil#JAWT_OSX_CALAYER_QUIRK_LAYOUT} final Point p0 = new Point(); final Component outterComp = getLocationOnScreenNonBlocking(p0, component); final java.awt.Insets outterInsets = AWTMisc.getInsets(outterComp, true); |