From a2a057406ff5d21499860e8fef6ba88f07d9bf95 Mon Sep 17 00:00:00 2001
From: Sven Gothel
- * As of today, we have to overwrite the CALayer size
- * w/ the AWT component one since programmatic resize leads to differences.
+ * AWT's super-calayer, i.e. the AWT's own component CALayer,
+ * does not layout our root-calayer in respect to this component's
+ * position and size, at least when resizing programmatically.
*
- * Hence this flag is always enabled.
+ * As of today, this flag is enabled for all known AWT versions.
*
* Sync w/ NativeWindowProtocols.h
@@ -128,17 +129,18 @@ public class JAWTUtil {
/**
* CALayer position needs to be set to zero.
*
- * Normally we have to set the root-calayer's position to 0/0
- * and leave client-calayer's position in it's desired place.
- * With pre AWT 1.7.0_40, the client-calayer's position has to
- * be set to zero as well.
+ * AWT's super-calayer, i.e. the AWT's own component CALayer,
+ * has a broken layout and needs it's sub-layers to be located at position 0/0.
+ *
+ * See
* Further more a re-layout seems to be required in this case,
* i.e. a programmatic forced resize +1 and it's inverted resize -1.
*
- * Hence this flag is enabled w/ AWT < 1.7.0_40.
+ * This flag is enabled w/ AWT < 1.7.0_40.
*
* Sync w/ NativeWindowProtocols.h
@@ -146,6 +148,34 @@ public class JAWTUtil {
*/
public static final int JAWT_OSX_CALAYER_QUIRK_POSITION = 1 << 1;
+ /**
+ * CALayer position needs to be derived from AWT position
+ * in relation to super CALayer.
+ *
+ * AWT's super-calayer, i.e. the AWT's own component CALayer,
+ * does not layout our root-calayer in respect to this component's
+ * position and size, at least when resizing programmatically.
+ *
+ * CALayer position has origin 0/0 at bottom/left,
+ * where AWT component has origin 0/0 at top/left.
+ *
+ * The super-calayer bounds exclude the frame's heavyweight border/insets.
+ *
+ * This flags also sets {@link #JAWT_OSX_CALAYER_QUIRK_SIZE},
+ * i.e. they are related.
+ *
+ * As of today, this flag is enabled for w/ AWT >= 1.7.0_40.
+ *
+ * Sync w/ NativeWindowProtocols.h
+ *
@@ -157,6 +187,7 @@ public class JAWTUtil {
* http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7172187
.
*
*
*