diff options
Diffstat (limited to 'src')
4 files changed, 15 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java index 5e7f80a9f..7a8e41cce 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java @@ -49,7 +49,6 @@ import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Map; -import java.util.StringTokenizer; import javax.media.nativewindow.AbstractGraphicsConfiguration; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.NativeSurface; diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java index b9b42e16a..51f9f53cc 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/awt/X11AWTGLXGraphicsConfigurationFactory.java @@ -89,11 +89,11 @@ public class X11AWTGLXGraphicsConfigurationFactory extends GLGraphicsConfigurati displayHandle = X11Util.createDisplay(null); owner = true; if(DEBUG) { - System.err.println("X11AWTGLXGraphicsConfigurationFactory: using a thread local X11 display"); + System.err.println(Thread.currentThread().getName() + " - X11AWTGLXGraphicsConfigurationFactory: using a thread local X11 display"); } } else { if(DEBUG) { - System.err.println("X11AWTGLXGraphicsConfigurationFactory: using AWT X11 display 0x"+Long.toHexString(displayHandle)); + System.err.println(Thread.currentThread().getName() + " - X11AWTGLXGraphicsConfigurationFactory: using AWT X11 display 0x"+Long.toHexString(displayHandle)); } /** * May cause an exception on NVidia X11 Display destruction, diff --git a/src/nativewindow/classes/com/jogamp/nativewindow/impl/jawt/JAWTUtil.java b/src/nativewindow/classes/com/jogamp/nativewindow/impl/jawt/JAWTUtil.java index 39816ff6a..0c6fc3f55 100644 --- a/src/nativewindow/classes/com/jogamp/nativewindow/impl/jawt/JAWTUtil.java +++ b/src/nativewindow/classes/com/jogamp/nativewindow/impl/jawt/JAWTUtil.java @@ -121,7 +121,7 @@ public class JAWTUtil { if(EventQueue.isDispatchThread()) { desktophints = (Map)(Toolkit.getDefaultToolkit().getDesktopProperty("awt.font.desktophints")); } else { - final ArrayList desktophintsBucket = new ArrayList(); + final ArrayList desktophintsBucket = new ArrayList(1); EventQueue.invokeAndWait(new Runnable() { public void run() { Map _desktophints = (Map)(Toolkit.getDefaultToolkit().getDesktopProperty("awt.font.desktophints")); diff --git a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java index 949afe5bd..33799d717 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java +++ b/src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java @@ -32,13 +32,18 @@ package javax.media.nativewindow.x11; +import com.jogamp.nativewindow.impl.Debug; import com.jogamp.nativewindow.impl.x11.X11Util; -import javax.media.nativewindow.*; +import javax.media.nativewindow.DefaultGraphicsDevice; +import javax.media.nativewindow.NativeWindowException; +import javax.media.nativewindow.NativeWindowFactory; +import javax.media.nativewindow.ToolkitLock; /** Encapsulates a graphics device on X11 platforms. */ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneable { + public static final boolean DEBUG = Debug.debug("GraphicsDevice"); boolean closeDisplay = false; /** Constructs a new X11GraphicsDevice corresponding to the given connection and default @@ -78,10 +83,16 @@ public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneabl public void setCloseDisplay(boolean close) { closeDisplay = close; + if(DEBUG && close) { + System.err.println(Thread.currentThread().getName() + " - X11GraphicsDevice.setCloseDisplay(true): "+this); + } } public boolean close() { // FIXME: shall we respect the unitID ? if(closeDisplay && 0 != handle) { + if(DEBUG) { + System.err.println(Thread.currentThread().getName() + " - X11GraphicsDevice.close(): "+this); + } X11Util.closeDisplay(handle); handle = 0; return true; |