diff options
author | Sven Gothel <[email protected]> | 2013-03-20 17:23:17 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-03-20 17:23:17 +0100 |
commit | 9dcd8bba63cfbcd6e72c855065cf4dafdbcf037e (patch) | |
tree | 03aa6340a5568ef527c09f127abbb7e147f996ba /src | |
parent | 23acd1f063cfd8519be57f867cbafe748094756d (diff) |
OSX/NEWT: Fix visible -> false when closing and reparenting window. This lead to non functional recreational reparenting.
OSX recreational reparenting moves the saved GLEventListenerState at destroy
to the new dawable/surface, which must be valid.
The flaky visible state caused seemingly random reparenting failures.
- WindowImpl.ReparentActionRecreate.run() set 'visible:=true', which circumvented OSX to wait for actual realization.
- OSX WindowDriver.closeNative(): Issue visibleChanged(true, false); ASAP
Diffstat (limited to 'src')
-rw-r--r-- | src/newt/classes/jogamp/newt/WindowImpl.java | 1 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index c01f880fc..45100421a 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -1275,7 +1275,6 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer final RecursiveLock _lock = windowLock; _lock.lock(); try { - visible = true; if(DEBUG_IMPLEMENTATION) { System.err.println("Window.reparentWindow: ReparentActionRecreate ("+getThreadName()+") windowHandle "+toHexString(windowHandle)+", visible: "+visible+", parentWindowHandle "+toHexString(parentWindowHandle)+", parentWindow "+Display.hashCodeNullSafe(parentWindow)); } diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java index 653e90e3b..965138ddf 100644 --- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java @@ -80,10 +80,11 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl try { if(DEBUG_IMPLEMENTATION) { System.err.println("MacWindow.CloseAction "+Thread.currentThread().getName()); } final long handle = getWindowHandle(); + visibleChanged(true, false); setWindowHandle(0); surfaceHandle = 0; sscSurfaceHandle = 0; - isOffscreenInstance = false; + isOffscreenInstance = false; if (0 != handle) { OSXUtil.RunOnMainThread(false, new Runnable() { public void run() { @@ -284,7 +285,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl 0 != ( FLAG_CHANGE_PARENTING & flags) || 0 != ( FLAG_CHANGE_FULLSCREEN & flags) ) { if(isOffscreenInstance) { - createWindow(true, 0 != getWindowHandle(), pClientLevelOnSreen, 64, 64, false, false, false); + createWindow(true, 0 != getWindowHandle(), pClientLevelOnSreen, 64, 64, false, setVisible, false); } else { createWindow(false, 0 != getWindowHandle(), pClientLevelOnSreen, width, height, 0 != ( FLAG_IS_FULLSCREEN & flags), setVisible, 0 != ( FLAG_IS_ALWAYSONTOP & flags)); @@ -488,7 +489,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl public void run() { initWindow0( parentWin, newWin, pS.getX(), pS.getY(), width, height, - isOpaque, fullscreen, visible, getScreen().getIndex(), surfaceHandle); + isOpaque, fullscreen, visible && !offscreenInstance, getScreen().getIndex(), surfaceHandle); if( offscreenInstance ) { orderOut0(0!=parentWin ? parentWin : newWin); } else { |