From 900d1baf3c7f92685c8d1eb4cdb9db8f8a69f974 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 10 Dec 2010 05:27:17 +0100 Subject: NEWT: Minor cleanup ; Debug setVisible message in issuing thread --- src/newt/classes/com/jogamp/newt/impl/WindowImpl.java | 14 ++++++++------ 1 file 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); } -- cgit v1.2.3