From 6d341e110912f9085194cb94ba6f6c358104ee71 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 15 Jan 2020 01:56:57 +0100 Subject: Bug 1421: NEWT OSX Invisible: Fix orderOut0 re commit d92dc518eb891f2d125a8136efd6ed603d74a6e9 We also cannot use 'mWin orderWindow: NSWindowOut relativeTo:..]' as it also removes the child-NSWindow from its parent like 'orderOut'. Hence only use 'orderBack' to keep the relationship inplace. Fake invisible child window is in progress, i.e. moving it out of the overal viewport (all screens). --- src/newt/native/MacWindow.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m index 8c2d97d12..a8f196fed 100644 --- a/src/newt/native/MacWindow.m +++ b/src/newt/native/MacWindow.m @@ -1267,7 +1267,6 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_WindowDriver_orderFront0 } DBG_PRINT( "orderFront0 - window: (parent %p) %p visible %d (END)\n", pWin, mWin, [mWin isVisible]); - [pool release]; } @@ -1300,7 +1299,9 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_WindowDriver_orderOut0 [mWin orderOut: mWin]; } else { // NSWindowOut: The window is removed from the screen list and otherWin is ignored. - [mWin orderWindow: NSWindowOut relativeTo: [pWin windowNumber]]; + // This would remove this window from its parent -> AVOID! + // [mWin orderWindow: NSWindowOut relativeTo: [pWin windowNumber]]; + [mWin orderBack: mWin]; } DBG_PRINT( "orderOut0 - window: (parent %p) %p visible %d (END)\n", pWin, mWin, [mWin isVisible]); -- cgit v1.2.3