summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index e9ac272c8..51a2aa73b 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -195,6 +195,10 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
return window.getRequestedCapabilities();
}
+ public NativeWindow getNativeWindow() {
+ return window;
+ }
+
public final Window getWindow() {
return window;
}
@@ -676,8 +680,18 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC
// GLDrawable methods
//
+
+ /**
+ * {@inheritDoc}
+ * <p>
+ * Be aware that the returned NativeSurface may change.
+ * If this inner {@link GLDrawable} representation became realized (see {@link #isRealized()})
+ * this {@link GLDrawable}'s {@link NativeSurface} instance is being returned.
+ * Otherwise this {@link Window} {@link NativeSurface}'s is being returned.
+ * </p>
+ */
public final NativeSurface getNativeSurface() {
- return null!=drawable ? drawable.getNativeSurface() : null;
+ return null!=drawable ? drawable.getNativeSurface() : window.getNativeSurface();
}
public final long getHandle() {