aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-06-23 01:00:52 +0200
committerSven Gothel <[email protected]>2013-06-23 01:00:52 +0200
commit455c305ef9ca3db975de589dc4b9d078f2b5cc7a (patch)
tree734bd774626987d7b4b59e7460a01f6e99282262
parentcdeee16cdb14a6977e6c2344ba16a2d9a02759ce (diff)
X11Util: Fix comment on markAllDisplaysUnclosable semantics, add 'final', reorder globalLock/isJVMShuttingDown branch/sync
-rw-r--r--src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
index 2d9c42e09..bbc58b73a 100644
--- a/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
+++ b/src/nativewindow/classes/jogamp/nativewindow/x11/X11Util.java
@@ -98,10 +98,10 @@ public class X11Util implements ToolkitProperties {
private static final boolean TRACE_DISPLAY_LIFECYCLE = Debug.isPropertyDefined("nativewindow.debug.X11Util.TraceDisplayLifecycle", true);
private static String nullDisplayName = null;
private static volatile boolean isInit = false;
- private static boolean markAllDisplaysUnclosable = false; // ATI/AMD X11 driver issues
+ private static boolean markAllDisplaysUnclosable = false; // ATI/AMD X11 driver issues, or GLRendererQuirks.DontCloseX11Display
private static boolean hasThreadingIssues = false; // ATI/AMD X11 driver issues
- private static Object setX11ErrorHandlerLock = new Object();
+ private static final Object setX11ErrorHandlerLock = new Object();
private static final String X11_EXTENSION_ATIFGLRXDRI = "ATIFGLRXDRI";
private static final String X11_EXTENSION_ATIFGLEXTENSION = "ATIFGLEXTENSION";
@@ -207,12 +207,12 @@ public class X11Util implements ToolkitProperties {
}
}
- synchronized(globalLock) {
- // Only at JVM shutdown time, since AWT impl. seems to
- // dislike closing of X11 Display's (w/ ATI driver).
- if( isJVMShuttingDown ) {
- isInit = false;
- closePendingDisplayConnections();
+ // Only at JVM shutdown time, since AWT impl. seems to
+ // dislike closing of X11 Display's (w/ ATI driver).
+ if( isJVMShuttingDown ) {
+ synchronized(globalLock) {
+ isInit = false;
+ closePendingDisplayConnections();
openDisplayList.clear();
reusableDisplayList.clear();
pendingDisplayList.clear();