summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java4
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java16
2 files changed, 14 insertions, 6 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
index a4349f545..8ee1adc06 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/awt/JAWTWindow.java
@@ -531,11 +531,11 @@ public abstract class JAWTWindow implements NativeWindow, OffscreenLayerSurface,
* @see #isOffscreenLayerSurfaceEnabled()
* @throws NativeWindowException if {@link #isOffscreenLayerSurfaceEnabled()} == false
*/
- protected void layoutSurfaceLayerImpl(final long layerHandle, final boolean visible) {}
+ protected void layoutSurfaceLayerImpl(final boolean visible) {}
private final void layoutSurfaceLayerIfEnabled(final boolean visible) throws NativeWindowException {
if( isOffscreenLayerSurfaceEnabled() && 0 != offscreenSurfaceLayer ) {
- layoutSurfaceLayerImpl(offscreenSurfaceLayer, visible);
+ layoutSurfaceLayerImpl(visible);
}
}
diff --git a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
index 4cba086e0..8848877d4 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/jawt/macosx/MacOSXJAWTWindow.java
@@ -177,7 +177,7 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface {
}
@Override
- protected void layoutSurfaceLayerImpl(final long layerHandle, final boolean visible) {
+ protected void layoutSurfaceLayerImpl(final boolean visible) {
final int caLayerQuirks = JAWTUtil.getOSXCALayerQuirks();
// 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.
@@ -199,14 +199,22 @@ public class MacOSXJAWTWindow extends JAWTWindow implements MutableSurface {
if( null != outterInsets ) {
pA1.translate(-outterInsets.left, -outterInsets.top);
}
- System.err.println("JAWTWindow.layoutSurfaceLayerImpl: "+toHexString(layerHandle) + ", quirks "+caLayerQuirks+", visible "+visible+
+ System.err.println("JAWTWindow.layoutSurfaceLayerImpl: "+toHexString(getAttachedSurfaceLayer()) + ", quirks "+caLayerQuirks+", visible "+visible+
", [ins "+outterInsets+"], pA "+pA0+" -> "+pA1+
", p0 "+p0+" -> "+p1+", bounds "+bounds);
} else if( DEBUG ) {
- System.err.println("JAWTWindow.layoutSurfaceLayerImpl: "+toHexString(layerHandle) + ", quirks "+caLayerQuirks+", visible "+visible+
+ System.err.println("JAWTWindow.layoutSurfaceLayerImpl: "+toHexString(getAttachedSurfaceLayer()) + ", quirks "+caLayerQuirks+", visible "+visible+
", [ins "+outterInsets+"], p0 "+p0+" -> "+p1+", bounds "+bounds);
}
- OSXUtil.FixCALayerLayout(rootSurfaceLayer, layerHandle, visible, p1.getX(), p1.getY(), getWidth(), getHeight(), caLayerQuirks);
+ OSXUtil.RunOnMainThread(false /* wait */, false, new Runnable() {
+ @Override
+ public void run() {
+ final long osl = getAttachedSurfaceLayer();
+ if( 0 != rootSurfaceLayer && 0 != osl ) {
+ OSXUtil.FixCALayerLayout(rootSurfaceLayer, osl, visible, p1.getX(), p1.getY(), getWidth(), getHeight(), caLayerQuirks);
+ }
+ }
+ });
}
@Override