diff options
author | Sven Gothel <[email protected]> | 2011-09-06 16:19:31 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-09-06 16:19:31 +0200 |
commit | 9c316a0f015bf0ce519fa7abf62f52e3aa21f701 (patch) | |
tree | 4d2d709daa64bac6352c9cd54f51e79de8780b44 | |
parent | b9abecf078de8c1f936422f9e1fce84d7826c959 (diff) |
NEWT Cleanup: Remove DEBUG_WINDOW_EVENT, ..
5 files changed, 13 insertions, 10 deletions
diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java index ed1cd93a9..ac8311a9a 100644 --- a/src/newt/classes/com/jogamp/newt/Window.java +++ b/src/newt/classes/com/jogamp/newt/Window.java @@ -45,7 +45,6 @@ import javax.media.nativewindow.WindowClosingProtocol; public interface Window extends NativeWindow, WindowClosingProtocol { public static final boolean DEBUG_MOUSE_EVENT = Debug.debug("Window.MouseEvent"); public static final boolean DEBUG_KEY_EVENT = Debug.debug("Window.KeyEvent"); - public static final boolean DEBUG_WINDOW_EVENT = Debug.debug("Window.WindowEvent"); public static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window"); /** A 1s timeout while waiting for a native action response, ie {@link #setVisible(boolean)}. */ diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java index 9de664982..37ca7afc7 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java +++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java @@ -326,7 +326,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC } public synchronized void destroyActionInLock() { - if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) { + if(Window.DEBUG_IMPLEMENTATION) { String msg = "GLWindow.destroy() "+Thread.currentThread()+", start"; System.err.println(msg); //Exception e1 = new Exception(msg); @@ -355,20 +355,20 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC } // helper=null; // pending events .. - if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) { + if(Window.DEBUG_IMPLEMENTATION) { System.err.println("GLWindow.destroy() "+Thread.currentThread()+", fin"); } } public synchronized void resetCounter() { - if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) { + if(Window.DEBUG_IMPLEMENTATION) { System.err.println("GLWindow.resetCounter() "+Thread.currentThread()); } GLWindow.this.resetFPSCounter(); } public synchronized void setVisibleActionPost(boolean visible, boolean nativeWindowCreated) { - if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) { + if(Window.DEBUG_IMPLEMENTATION) { String msg = "GLWindow.setVisibleActionPost("+visible+", "+nativeWindowCreated+") "+Thread.currentThread()+", start"; System.err.println(msg); // Exception e1 = new Exception(msg); @@ -396,7 +396,7 @@ public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer, FPSC context = drawable.createContext(sharedContext); context.setContextCreationFlags(additionalCtxCreationFlags); } - if(Window.DEBUG_WINDOW_EVENT || Window.DEBUG_IMPLEMENTATION) { + if(Window.DEBUG_IMPLEMENTATION) { String msg = "GLWindow.setVisibleActionPost("+visible+", "+nativeWindowCreated+") "+Thread.currentThread()+", fin"; System.err.println(msg); //Exception e1 = new Exception(msg); diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java index 26c437b4d..ddb409338 100644 --- a/src/newt/classes/jogamp/newt/DisplayImpl.java +++ b/src/newt/classes/jogamp/newt/DisplayImpl.java @@ -381,8 +381,12 @@ public abstract class DisplayImpl extends Display { public void dispatchMessages() { // System.err.println("Display.dispatchMessages() 0 "+this+" "+getThreadName()); - if(0==refCount) return; // no screens - if(null==getGraphicsDevice()) return; // no native device + if(0==refCount || // no screens + null==getGraphicsDevice() // no native device + ) + { + return; + } ArrayList<NEWTEventTask> _events = null; diff --git a/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java index 4ab12bbc8..531b8d2a8 100644 --- a/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java @@ -184,7 +184,7 @@ public class AWTWindow extends WindowImpl { if(!container.isDisplayable()) { frame.setUndecorated(isUndecorated()); } else { - if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) { + if(DEBUG_IMPLEMENTATION) { System.err.println("AWTWindow can't undecorate already created frame"); } } diff --git a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java index 1b33900a4..a78014468 100644 --- a/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java +++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java @@ -84,7 +84,7 @@ public class WindowsWindow extends WindowImpl { if(0!=getWindowHandle()) { long _hmon = MonitorFromWindow0(getWindowHandle()); if (hmon != _hmon) { - if(DEBUG_IMPLEMENTATION || DEBUG_WINDOW_EVENT) { + if(DEBUG_IMPLEMENTATION) { Exception e = new Exception("Info: Window Device Changed "+Thread.currentThread().getName()+ ", HMON "+toHexString(hmon)+" -> "+toHexString(_hmon)); e.printStackTrace(); |