diff options
author | Sven Gothel <[email protected]> | 2013-09-24 23:13:16 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-09-24 23:13:16 +0200 |
commit | 4b5435c68c3f12d62dadb395957362eceacfb25c (patch) | |
tree | 367ffa26e9a1119ac0ca5fe74eb8a96b367f6d68 /src/newt/classes/com/jogamp | |
parent | 2f09d266f75dfb4ab0d4504dd0a7699757bc40b3 (diff) |
Bug 816: Fix OSX CALayer 'quirks' for AWT 1.7.0_40 - See JAWTUtil JAWT_OSX_CALAYER_QUIRK_SIZE and JAWT_OSX_CALAYER_QUIRK_POSITION.
- Provide quirk bits for OSX CALayer depending on used JVM/AWT
and act accordingly.
- TestBug816OSXCALayerPosAWT: Add resize by frame
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java | 5 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java index 374a80325..eadb69ec2 100644 --- a/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java +++ b/src/newt/classes/com/jogamp/newt/awt/NewtCanvasAWT.java @@ -56,6 +56,7 @@ import javax.media.opengl.GLDrawableFactory; import javax.swing.MenuSelectionManager; import jogamp.nativewindow.awt.AWTMisc; +import jogamp.nativewindow.jawt.JAWTUtil; import jogamp.newt.Debug; import jogamp.newt.WindowImpl; import jogamp.newt.awt.NewtFactoryAWT; @@ -63,7 +64,6 @@ import jogamp.newt.awt.event.AWTParentWindowAdapter; import jogamp.newt.driver.DriverClearFocus; import jogamp.opengl.awt.AWTTilePainter; -import com.jogamp.common.os.Platform; import com.jogamp.common.util.awt.AWTEDTExecutor; import com.jogamp.nativewindow.awt.AWTPrintLifecycle; import com.jogamp.nativewindow.awt.AWTWindowClosingProtocol; @@ -741,7 +741,8 @@ public class NewtCanvasAWT extends java.awt.Canvas implements WindowClosingProto newtChild.setSize(w, h); newtChild.reparentWindow(jawtWindow); newtChild.addSurfaceUpdatedListener(jawtWindow); - if( Platform.OSType.MACOS == Platform.getOSType() && jawtWindow.isOffscreenLayerSurfaceEnabled() ) { + if( jawtWindow.isOffscreenLayerSurfaceEnabled() && + 0 != ( JAWTUtil.JAWT_OSX_CALAYER_QUIRK_POSITION & JAWTUtil.getOSXCALayerQuirks() ) ) { AWTEDTExecutor.singleton.invoke(false, forceRelayout); } newtChild.setVisible(true); diff --git a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java index e8cd71514..83a129455 100644 --- a/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java +++ b/src/newt/classes/com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.java @@ -42,7 +42,8 @@ import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLEventListener; import javax.media.opengl.GLProfile; -import com.jogamp.common.os.Platform; +import jogamp.nativewindow.jawt.JAWTUtil; + import com.jogamp.newt.awt.NewtCanvasAWT; import com.jogamp.newt.opengl.GLWindow; @@ -251,7 +252,9 @@ public class JOGLNewtApplet1Run extends Applet { System.err.println("GLWindow: "+glWindow); } base.start(); - if( null != newtCanvasAWT && Platform.OSType.MACOS == Platform.getOSType() && newtCanvasAWT.isOffscreenLayerSurfaceEnabled() ) { + if( null != newtCanvasAWT && + newtCanvasAWT.isOffscreenLayerSurfaceEnabled() && + 0 != ( JAWTUtil.JAWT_OSX_CALAYER_QUIRK_POSITION & JAWTUtil.getOSXCALayerQuirks() ) ) { // force relayout final int cW = newtCanvasAWT.getWidth(); final int cH = newtCanvasAWT.getHeight(); |