aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java b/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java
index 11575ab65..f4c8944df 100644
--- a/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java
+++ b/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java
@@ -56,12 +56,14 @@ public class AWTUtil {
static {
lockedToolkit = false;
headlessMode = GraphicsEnvironment.isHeadless();
- try {
- j2dClazz = Class.forName("com.sun.opengl.impl.awt.Java2D");
- isOGLPipelineActive = j2dClazz.getMethod("isOGLPipelineActive", null);
- isQueueFlusherThread = j2dClazz.getMethod("isQueueFlusherThread", null);
- j2dOk = true;
- } catch (Exception e) {}
+ if(!headlessMode) {
+ try {
+ j2dClazz = Class.forName("com.sun.opengl.impl.awt.Java2D");
+ isOGLPipelineActive = j2dClazz.getMethod("isOGLPipelineActive", null);
+ isQueueFlusherThread = j2dClazz.getMethod("isQueueFlusherThread", null);
+ j2dOk = true;
+ } catch (Exception e) {}
+ }
}
private static boolean lockedToolkit;
@@ -117,7 +119,7 @@ public class AWTUtil {
}
public static boolean isToolkitLocked() {
- return lockedToolkit;
+ return JAWTUtil.isToolkitLocked();
}
}