aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-11-26 18:33:20 +0100
committerSven Gothel <[email protected]>2011-11-26 18:33:20 +0100
commit78121938f8b432617bbb9f8e3e259ff1ffa9442e (patch)
treee4207c4eadde332f85e9b9e43e4c7cfeb2aa3338 /src/nativewindow/classes/jogamp
parente3c6a30ade94862a344c86dc0b733716c6fa27f5 (diff)
Revert some changes: X11Screen/RANDR, X11Util (XInitThreads/XLockDisplay), NEWT XDisplay Locking
Revert X11Screen RANDR commit 8cecd0c2963d982aa119cbb07698e56b9c271188, ie. use default 'render' display connection, best results on Ubuntu, Solaris, CentOS (no failures). Revert X11Util (XInitThreads/XLockDisplay) rational logic, commit 0314be79a7a93931a74fe4322bc78e699d7741e9, X11Util.HAS_XLOCKDISPLAY_BUG:=true and X11Util.XINITTHREADS_ALWAYS_ENABLED:=true. Which enables always utilizing XInitThreads() either before or after AWT initialization, as well as disable all XLockDisplay/XUnlockDisplay locks. Rever NEWT XDisplay X11 basic Locking commit 50100b85ce5fde48788efbc2211b26fb9d7c9dfd, ie use null locking if X11Util.HAS_XLOCKDISPLAY_BUG and X11Util.XINITTHREADS_ALWAYS_ENABLED.
Diffstat (limited to 'src/nativewindow/classes/jogamp')
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
index 94a47d0f7..bc43a9a97 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
@@ -73,8 +73,12 @@ public class X11Util {
* </p>
*/
public static final boolean ATI_HAS_XCLOSEDISPLAY_BUG = true;
+
+ /** Value is <code>true</code>, best 'stable' results if always using XInitThreads(). */
+ public static final boolean XINITTHREADS_ALWAYS_ENABLED = true;
- // public static final boolean HAS_XLOCKDISPLAY_BUG = false;
+ /** Value is <code>true</code>, best 'stable' results if not using XLockDisplay/XUnlockDisplay at all. */
+ public static final boolean HAS_XLOCKDISPLAY_BUG = true;
private static final boolean DEBUG = Debug.debug("X11Util");
private static final boolean TRACE_DISPLAY_LIFECYCLE = Debug.getBooleanProperty("nativewindow.debug.X11Util.TraceDisplayLifecycle", true, AccessController.getContext());
@@ -89,15 +93,19 @@ public class X11Util {
private static Object setX11ErrorHandlerLock = new Object();
+ @SuppressWarnings("unused")
public static synchronized void initSingleton(final boolean firstX11ActionOnProcess) {
if(!isInit) {
NWJNILibLoader.loadNativeWindow("x11");
- isX11LockAvailable = initialize0( firstX11ActionOnProcess ) /* && !HAS_XLOCKDISPLAY_BUG */ ;
+ final boolean callXInitThreads = XINITTHREADS_ALWAYS_ENABLED || firstX11ActionOnProcess;
+ final boolean isXInitThreadsOK = initialize0( XINITTHREADS_ALWAYS_ENABLED || firstX11ActionOnProcess );
+ isX11LockAvailable = isXInitThreadsOK && !HAS_XLOCKDISPLAY_BUG ;
if(DEBUG) {
System.err.println("X11Util firstX11ActionOnProcess: "+firstX11ActionOnProcess+
", requiresX11Lock "+requiresX11Lock+
+ ", XInitThreads [called "+callXInitThreads+", OK "+isXInitThreadsOK+"]"+
", isX11LockAvailable "+isX11LockAvailable);
// Thread.dumpStack();
}