summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-30 11:36:03 +0100
committerSven Gothel <[email protected]>2014-01-30 11:36:03 +0100
commitc60f114c322b11c09101839f7464946daec84cfd (patch)
treea3096ef390d36c6f46f48182346999e12581bc63 /src/nativewindow/classes/com
parent5a661f4736c6d2e42b7114004a4dcbca3fe3f7a2 (diff)
NativeWindowFactory: Add Support for creating a platform agnostic wrapped AbstractGraphicsDevice/NativeWindow
Diffstat (limited to 'src/nativewindow/classes/com')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
index 10e3f7857..863e53bde 100644
--- a/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
+++ b/src/nativewindow/classes/com/jogamp/nativewindow/x11/X11GraphicsDevice.java
@@ -82,6 +82,21 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl
isXineramaEnabled = X11Util.XineramaIsEnabled(this);
}
+ /**
+ * Constructs a new X11GraphicsDevice corresponding to the given display connection.
+ * <p>
+ * The constructor opens the native connection and takes ownership.
+ * </p>
+ * @param displayConnection the semantic display connection name
+ * @param locker custom {@link javax.media.nativewindow.ToolkitLock}, eg to force null locking w/ private connection
+ * @see DefaultGraphicsDevice#DefaultGraphicsDevice(String, String, int, long, ToolkitLock)
+ */
+ public X11GraphicsDevice(String displayConnection, int unitID, ToolkitLock locker) {
+ super(NativeWindowFactory.TYPE_X11, displayConnection, unitID, 0, locker);
+ handleOwner = true;
+ open();
+ isXineramaEnabled = X11Util.XineramaIsEnabled(this);
+ }
private static int getDefaultScreenImpl(long dpy) {
return X11Lib.DefaultScreen(dpy);