summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-23 06:27:26 +0100
committerSven Gothel <[email protected]>2010-12-23 06:27:26 +0100
commit9d7109c58270bc2b4215b24447894be766943b80 (patch)
treefb4097ef5af8bb009e5d4b0435c4a4a5ffe5e1ce /src/nativewindow/classes
parente7778124162aef7004e040dded5de1eaf5e1ece4 (diff)
Cleanup / Debug
Diffstat (limited to 'src/nativewindow/classes')
-rw-r--r--src/nativewindow/classes/com/jogamp/nativewindow/impl/jawt/JAWTUtil.java2
-rw-r--r--src/nativewindow/classes/javax/media/nativewindow/x11/X11GraphicsDevice.java13
2 files changed, 13 insertions, 2 deletions
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;