From 1f65dedf406455731fb682404a01c96aa85d5ae1 Mon Sep 17 00:00:00 2001 From: sg215889 Date: Mon, 20 Jul 2009 11:51:27 -0700 Subject: Using commont JAWTUtil for final locking --- src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes/com') 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 6170e4b29..11575ab65 100644 --- a/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java +++ b/src/jogl/classes/com/sun/opengl/impl/awt/AWTUtil.java @@ -83,17 +83,18 @@ public class AWTUtil { try { if( !((Boolean)isOGLPipelineActive.invoke(null, null)).booleanValue() || !((Boolean)isQueueFlusherThread.invoke(null, null)).booleanValue() ) { - JAWT.getJAWT().Lock(); + JAWTUtil.lockToolkit(); } } catch (Exception e) { j2dOk=false; } } if(!j2dOk) { - JAWT.getJAWT().Lock(); + JAWTUtil.lockToolkit(); } } public static synchronized void unlockToolkit() { if (lockedToolkit) { + lockedToolkit = false; if (headlessMode) { // Workaround for running (to some degree) in headless // environments but still supporting rendering via pbuffers @@ -105,14 +106,13 @@ public class AWTUtil { try { if( !((Boolean)isOGLPipelineActive.invoke(null, null)).booleanValue() || !((Boolean)isQueueFlusherThread.invoke(null, null)).booleanValue() ) { - JAWT.getJAWT().Unlock(); + JAWTUtil.unlockToolkit(); } } catch (Exception e) { j2dOk=false; } } if(!j2dOk) { - JAWT.getJAWT().Unlock(); + JAWTUtil.unlockToolkit(); } - lockedToolkit = false; } } -- cgit v1.2.3