From c60f114c322b11c09101839f7464946daec84cfd Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 30 Jan 2014 11:36:03 +0100 Subject: NativeWindowFactory: Add Support for creating a platform agnostic wrapped AbstractGraphicsDevice/NativeWindow --- .../com/jogamp/nativewindow/x11/X11GraphicsDevice.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nativewindow/classes/com') 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. + *

+ * The constructor opens the native connection and takes ownership. + *

+ * @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); -- cgit v1.2.3