diff options
author | Sven Gothel <[email protected]> | 2010-12-10 05:27:17 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-12-10 05:27:17 +0100 |
commit | 900d1baf3c7f92685c8d1eb4cdb9db8f8a69f974 (patch) | |
tree | 8041ae09200ac07337aee297ca2f643589ea6fcb /src/newt/classes/com | |
parent | ee4a086bf755518e7fab8117057e4848aad53070 (diff) |
NEWT: Minor cleanup ; Debug setVisible message in issuing thread
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/impl/WindowImpl.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java b/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java index eb46ef99e..ad11d8ab9 100644 --- a/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java +++ b/src/newt/classes/com/jogamp/newt/impl/WindowImpl.java @@ -466,11 +466,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer public final void unlockSurface() { // may throw RuntimeException if not locked windowLock.validateLocked(); + AbstractGraphicsDevice adevice = screen.getDisplay().getGraphicsDevice(); try { unlockSurfaceImpl(); } finally { - screen.getDisplay().getGraphicsDevice().unlock(); + adevice.unlock(); } windowLock.unlock(); } @@ -586,11 +587,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer public void run() { windowLock.lock(); try { - if(DEBUG_IMPLEMENTATION) { - String msg = new String("Window setVisible: START ("+getThreadName()+") "+x+"/"+y+" "+width+"x"+height+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+WindowImpl.this.visible+" -> "+visible+", parentWindowHandle "+toHexString(WindowImpl.this.parentWindowHandle)+", parentWindow "+(null!=WindowImpl.this.parentWindow)/*+", "+this*/); - System.err.println(msg); - } - if(null!=lifecycleHook) { lifecycleHook.resetCounter(); } @@ -651,6 +647,12 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer // fast-path: not realized yet, make visible, but zero size return; } + + if(DEBUG_IMPLEMENTATION) { + String msg = new String("Window setVisible: START ("+getThreadName()+") "+x+"/"+y+" "+width+"x"+height+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+this.visible+" -> "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+(null!=parentWindow)/*+", "+this*/); + System.err.println(msg); + Thread.dumpStack(); + } VisibleAction visibleAction = new VisibleAction(visible); runOnEDTIfAvail(true, visibleAction); } |