diff options
Diffstat (limited to 'src/classes/com/sun/javafx/newt')
7 files changed, 7 insertions, 29 deletions
diff --git a/src/classes/com/sun/javafx/newt/GLWindow.java b/src/classes/com/sun/javafx/newt/GLWindow.java index e7e5408fa..f7aedcf2a 100644 --- a/src/classes/com/sun/javafx/newt/GLWindow.java +++ b/src/classes/com/sun/javafx/newt/GLWindow.java @@ -126,11 +126,6 @@ public class GLWindow extends Window implements GLAutoDrawable { return new GLWindow(window); } - public boolean isTerminalObject() { - shouldNotCallThis(); - return false; - } - protected void createNative(GLCapabilities caps) { shouldNotCallThis(); } @@ -227,7 +222,11 @@ public class GLWindow extends Window implements GLAutoDrawable { window.setVisible(visible); if (visible && context == null) { factory = GLDrawableFactory.getFactory(); - drawable = factory.createGLDrawable(window, window.getChosenCapabilities(), null); + NativeWindow nw = window; + if (window.getWrappedWindow() != null) { + nw = NativeWindowFactory.getNativeWindow(window.getWrappedWindow()); + } + drawable = factory.createGLDrawable(nw, window.getChosenCapabilities(), null); window.setVisible(true); drawable.setRealized(true); context = drawable.createContext(null); diff --git a/src/classes/com/sun/javafx/newt/Window.java b/src/classes/com/sun/javafx/newt/Window.java index b4333bf2b..ab0588e8e 100755 --- a/src/classes/com/sun/javafx/newt/Window.java +++ b/src/classes/com/sun/javafx/newt/Window.java @@ -112,8 +112,6 @@ public abstract class Window implements NativeWindow } } - public abstract boolean isTerminalObject(); - /** * Create native windowHandle, ie creates a new native invisible window * @@ -155,7 +153,6 @@ public abstract class Window implements NativeWindow ", pos "+getX()+"/"+getY()+", size "+getWidth()+"x"+getHeight()+ ", visible "+isVisible()+ ", wrappedWindow "+getWrappedWindow()+ - ", terminalObject "+isTerminalObject()+ ", visualID "+visualID+ ", "+chosenCaps+ ", screen handle/index "+getScreenHandle()+"/"+getScreenIndex() + @@ -297,6 +294,8 @@ public abstract class Window implements NativeWindow return height; } + /** If this Window actually wraps one from another toolkit such as + the AWT, this will return a non-null value. */ public Object getWrappedWindow() { return null; } diff --git a/src/classes/com/sun/javafx/newt/awt/AWTWindow.java b/src/classes/com/sun/javafx/newt/awt/AWTWindow.java index 07510e7a6..595e84cb0 100644 --- a/src/classes/com/sun/javafx/newt/awt/AWTWindow.java +++ b/src/classes/com/sun/javafx/newt/awt/AWTWindow.java @@ -83,10 +83,6 @@ public class AWTWindow extends Window { private int displayWidth; private int displayHeight; - public final boolean isTerminalObject() { - return false; - } - public void setTitle(String title) { super.setTitle(title); if (frame != null) { diff --git a/src/classes/com/sun/javafx/newt/kd/KDWindow.java b/src/classes/com/sun/javafx/newt/kd/KDWindow.java index b7b9f6686..44e297a92 100755 --- a/src/classes/com/sun/javafx/newt/kd/KDWindow.java +++ b/src/classes/com/sun/javafx/newt/kd/KDWindow.java @@ -56,10 +56,6 @@ public class KDWindow extends Window { public KDWindow() { } - public final boolean isTerminalObject() { - return true; - } - protected void createNative(GLCapabilities caps) { int eglRenderableType; if(GLProfile.isGLES1()) { diff --git a/src/classes/com/sun/javafx/newt/macosx/MacWindow.java b/src/classes/com/sun/javafx/newt/macosx/MacWindow.java index 8427bb607..dce504f83 100755 --- a/src/classes/com/sun/javafx/newt/macosx/MacWindow.java +++ b/src/classes/com/sun/javafx/newt/macosx/MacWindow.java @@ -65,10 +65,6 @@ public class MacWindow extends Window { return 0; } - public final boolean isTerminalObject() { - return true; - } - public final int getDisplayWidth() { return 640; } diff --git a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java index bd60402d2..de05f0951 100755 --- a/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java +++ b/src/classes/com/sun/javafx/newt/windows/WindowsWindow.java @@ -55,10 +55,6 @@ public class WindowsWindow extends Window { public WindowsWindow() { } - public final boolean isTerminalObject() { - return true; - } - public long getSurfaceHandle() { if (hdc == 0) { hdc = GetDC(windowHandle); diff --git a/src/classes/com/sun/javafx/newt/x11/X11Window.java b/src/classes/com/sun/javafx/newt/x11/X11Window.java index c77933f18..ee0846e1b 100755 --- a/src/classes/com/sun/javafx/newt/x11/X11Window.java +++ b/src/classes/com/sun/javafx/newt/x11/X11Window.java @@ -54,10 +54,6 @@ public class X11Window extends Window { public X11Window() { } - public final boolean isTerminalObject() { - return true; - } - protected void createNative(GLCapabilities caps) { chosenCaps = (GLCapabilities) caps.clone(); // FIXME: visualID := f1(caps); caps := f2(visualID) visualID = 0; // n/a |