diff options
author | Maik Riechert <maik.riechert@arcor.de> | 2013-06-12 22:57:54 +0200 |
---|---|---|
committer | Maik Riechert <maik.riechert@arcor.de> | 2013-06-13 11:30:00 +0200 |
commit | f21f4d8e0f125f6c054b9f07e707fdf900fe4b35 (patch) | |
tree | 153efe2e46dc7658c4d02603d3b61b6330bffb40 /src/nativewindow/classes | |
parent | 19225a21d8d2a2e09f166f8f1f0411f3f934b9a0 (diff) |
Support specifying the X11 default display with a system property
Usually, the environment variable DISPLAY is used to define the default
display under X11. There are cases where the default display has to be
defined or overridden programmatically. For those cases, the new system
property nativewindow.x11.display.default can be used (as environment variables can't
be changed in Java). Its semantics are identical to the DISPLAY
environment variable.
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java index e28aff116..2d9c42e09 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java +++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java @@ -46,6 +46,7 @@ import jogamp.nativewindow.NWJNILibLoader; import jogamp.nativewindow.ToolkitProperties; import com.jogamp.common.util.LongObjectHashMap; +import com.jogamp.common.util.PropertyAccess; import com.jogamp.nativewindow.x11.X11GraphicsDevice; /** @@ -123,7 +124,7 @@ public class X11Util implements ToolkitProperties { final boolean isInitOK = initialize0( XERROR_STACKDUMP ); final boolean hasX11_EXTENSION_ATIFGLRXDRI, hasX11_EXTENSION_ATIFGLEXTENSION; - final long dpy = X11Lib.XOpenDisplay(null); + final long dpy = X11Lib.XOpenDisplay(PropertyAccess.getProperty("nativewindow.x11.display.default", true)); if(0 != dpy) { if(XSYNC_ENABLED) { X11Lib.XSynchronize(dpy, true); |