diff options
author | Sven Gothel <[email protected]> | 2013-04-13 08:15:21 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-04-13 08:15:21 +0200 |
commit | 9d78ea65a6bf1064887bc7524c01a689a1fc2a5c (patch) | |
tree | fdd85fcce8cc5d55898b93ee13a25779b4cda215 /src/newt/classes/com/jogamp | |
parent | 5606dd12f8086b506f33030072af5095a5871f9c (diff) |
NEWT/AWT: Fix 'AWT driver' to work w/ OSX CALayer ; WindowImpl: 'Object getWrappedWindow()' -> 'NativeSurface getWrappedSurface()'
WindowImpl: 'Object getWrappedWindow()' -> 'NativeSurface getWrappedSurface()'
- AWT driver itself instantiates the JAWTWindow for eager initialization at createNative().
Fix 'AWT driver' to work w/ OSX CALayer
- See above
- size reconfig changed to ease OSX CALayer,
i.e. set frame's size if already visible reducing CALayer artefacts.
Diffstat (limited to 'src/newt/classes/com/jogamp')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/opengl/GLWindow.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index a6c655915..de62747be 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -40,7 +40,6 @@ import javax.media.nativewindow.CapabilitiesImmutable; import javax.media.nativewindow.NativeSurface; import javax.media.nativewindow.NativeWindow; import javax.media.nativewindow.NativeWindowException; -import javax.media.nativewindow.NativeWindowFactory; import javax.media.nativewindow.SurfaceUpdatedListener; import javax.media.nativewindow.util.InsetsImmutable; import javax.media.nativewindow.util.Point; @@ -472,17 +471,16 @@ public class GLWindow extends GLAutoDrawableBase implements GLAutoDrawable, Wind if( ( null != context ) ) { throw new InternalError("GLWindow.LifecycleHook.setVisiblePost: "+WindowImpl.getThreadName()+" - Null drawable, but valid context - "+GLWindow.this); } - final NativeWindow nw; - if (window.getWrappedWindow() != null) { - nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow(), window.getPrivateGraphicsConfiguration()); - } else { - nw = window; + final NativeSurface ns; + { + final NativeSurface wrapped_ns = window.getWrappedSurface(); + ns = null != wrapped_ns ? wrapped_ns : window; } - final GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) nw.getGraphicsConfiguration().getChosenCapabilities(); + final GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) ns.getGraphicsConfiguration().getChosenCapabilities(); if(null==factory) { factory = GLDrawableFactory.getFactory(glCaps.getGLProfile()); } - drawable = (GLDrawableImpl) factory.createGLDrawable(nw); + drawable = (GLDrawableImpl) factory.createGLDrawable(ns); drawable.setRealized(true); if( !GLWindow.this.pushGLEventListenerState() ) { |