summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-30 11:37:05 +0100
committerSven Gothel <[email protected]>2014-01-30 11:37:05 +0100
commit6b37c1c3d109d3ae83d19ac84b50c7b3249af95a (patch)
treea34c39387398b25da628b4eba6f3eb1eba77a3e6 /src
parentc60f114c322b11c09101839f7464946daec84cfd (diff)
NewtFactory: Fix createWindow(..) ctor w/ given native window handle (use displayConnection string and screen-idx)
Diffstat (limited to 'src')
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
index 4fec00525..fc3716a52 100644
--- a/src/newt/classes/com/jogamp/newt/NewtFactory.java
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -305,10 +305,6 @@ public class NewtFactory {
return WindowImpl.create(parentNativeWindow, 0, screen, caps);
}
- protected static Window createWindowImpl(long parentWindowHandle, Screen screen, CapabilitiesImmutable caps) {
- return WindowImpl.create(null, parentWindowHandle, screen, caps);
- }
-
protected static Window createWindowImpl(Screen screen, CapabilitiesImmutable caps) {
return WindowImpl.create(null, 0, screen, caps);
}
@@ -322,11 +318,17 @@ public class NewtFactory {
/**
* Create a child Window entity attached to the given parent, incl native creation<br>
*
- * @param parentWindowObject the native parent window handle
- * @param undecorated only impacts if the window is in top-level state, while attached to a parent window it's rendered undecorated always
+ * @param displayConnection the parent window's display connection
+ * @param screenIdx the desired screen index
+ * @param parentWindowHandle the native parent window handle
+ * @param caps the desired capabilities
+ * @return
*/
- public static Window createWindow(long parentWindowHandle, Screen screen, CapabilitiesImmutable caps) {
- return createWindowImpl(parentWindowHandle, screen, caps);
+ public static Window createWindow(String displayConnection, int screenIdx, long parentWindowHandle, CapabilitiesImmutable caps) {
+ final String type = NativeWindowFactory.getNativeWindowType(true);
+ Display display = NewtFactory.createDisplay(type, displayConnection, true);
+ Screen screen = NewtFactory.createScreen(display, screenIdx);
+ return WindowImpl.create(null, parentWindowHandle, screen, caps);
}
/**