aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-06 05:50:55 +0200
committerSven Gothel <[email protected]>2011-10-06 05:50:55 +0200
commit51f84125beb4ac50fedab9fe691225b234b12bc6 (patch)
tree12cbb2fefd27acc583474d2173d718c363668fb1 /src/newt/classes/jogamp
parent6d28a9ed9ff039237775ea133377f8b59ca857c1 (diff)
NEWT/Window/setVisible: Remove setVisible(..) fast path - Always set visible=true, even if size==0
We need to earmark visible=true in case the native window could not be created, even if the size is currently 0.
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/WindowImpl.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java
index f2012215e..00911443a 100644
--- a/src/newt/classes/jogamp/newt/WindowImpl.java
+++ b/src/newt/classes/jogamp/newt/WindowImpl.java
@@ -288,9 +288,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
}
}
- // always flag visible,
- // allowing to retry if visible && !isNativeValid()
- visible = true;
}
} finally {
if(null!=parentWindow) {
@@ -699,6 +696,8 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
nativeWindowCreated = createNative();
madeVisible = nativeWindowCreated;
}
+ // always flag visible, allowing a retry ..
+ WindowImpl.this.visible = true;
} else if(WindowImpl.this.visible != visible) {
if(isNativeValid()) {
setVisibleImpl(visible, x, y, width, height);
@@ -745,11 +744,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer
}
public void setVisible(boolean visible) {
- if( !isNativeValid() && visible && 0>=width*height ) {
- // fast-path: not realized yet, make visible, but zero size
- return;
- }
-
if(DEBUG_IMPLEMENTATION) {
System.err.println("Window setVisible: START ("+getThreadName()+") "+x+"/"+y+" "+width+"x"+height+", fs "+fullscreen+", windowHandle "+toHexString(windowHandle)+", visible: "+this.visible+" -> "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+(null!=parentWindow));
Thread.dumpStack();