diff options
author | Sven Gothel <[email protected]> | 2013-10-03 15:35:09 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-03 15:35:09 +0200 |
commit | e9ce2246c947cc357fef993003008fe4c6a0495f (patch) | |
tree | b4e1185b55aa671b46fe8a2016c72e2958ebb893 /src/nativewindow | |
parent | 7f7275834922b9c30aec6520dc5c5f20939a49d8 (diff) |
Bug 816 (OSX CALayer pos): Add detailed description (pseudo code) to JAWTUtil.JAWT_OSX_CALAYER_QUIRK_LAYOUT
Diffstat (limited to 'src/nativewindow')
-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); |