UnstableChanges

Summary

  1. Bug 1421: NEWT OSX Invisible: Refining child window visibility setting, commenting on child-window orderOut (details)
  2. NEWT OSX/IOS WindowDriver: Minor cleanup of local var usage (prefer reuse); reconfig: Only orderOut w/ valid window-handle (details)
  3. NEWT OSX MacWindow.c: Add parentWindow to DBG_PRINT (details)
  4. Bug 1421: NEWT OSX Invisible: Fix orderOut0 re commit d92dc518eb891f2d125a8136efd6ed603d74a6e9 (details)
  5. Bug 1421: NEWT OSX Invisible: Implement 'Fake invisible child window' (details)
  6. NEWT.Window: Add 'StringBuilder append(StringBuilder sb)' supporting building custom efficient presentations (details)
  7. Bug 1421: NEWTCanvasSWT: No action on SWT.Activate, use SWT.FocusIn. Also remove all SWT listener on dispose. (details)
  8. Bug 1421: Conclude OSX: Forward SHOW and HIDE events to NewtCanvasSWT instances if 'below notification threshold' (details)
  9. Bug 1421: NEWT OSX Invisible: Refine 'Fake invisible child window' off-viewport position (details)
  10. TestGLCanvasSWTNewtCanvasSWTPosInTabs: Only use 1 Animator to easy example code (details)
Commit d92dc518eb891f2d125a8136efd6ed603d74a6e9 by Sven Gothel
Bug 1421: NEWT OSX Invisible: Refining child window visibility setting, commenting on child-window orderOut

Actual small change is to have child-NSWindow to use '[myWindow orderWindow: NSWindowAbove relativeTo:..'
instead of 'orderFront' in creation and use the simple 'orderFront' to set a top-level NSWindow visible.

Adding comment why we can't use 'orderOut' on child-NSWindow setting it invisible,
this is due to OSX 10.7 changes and testing detaching the child-window from its parent
causes havoc w/ SWT at least.
Hence we only issue 'mWin orderWindow: NSWindowOut relativeTo:..]' and the result is
having the child-NSWindow below the application.

This in turn will make it visible again when moving the application around,
as this child-NSWindow will no more follow the position.

Suggestion is to have this 'fake invisible' child-NSWindow to be moved
out of the overal viewport (all screens).
The file was modifiedmake/scripts/tests.sh (diff)
The file was modifiedsrc/newt/native/MacWindow.m (diff)
The file was modifiedsrc/newt/native/MacNewtNSWindow.m (diff)
Commit abc833e8e3763b1477e8e7c22a04b6fecf97cf20 by Sven Gothel
NEWT OSX/IOS WindowDriver: Minor cleanup of local var usage (prefer reuse); reconfig: Only orderOut w/ valid window-handle
The file was modifiedsrc/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java (diff)
The file was modifiedsrc/newt/classes/jogamp/newt/driver/ios/WindowDriver.java (diff)
Commit fcad9bd8856f4058925389854a31ec265b94d5e0 by Sven Gothel
NEWT OSX MacWindow.c: Add parentWindow to DBG_PRINT
The file was modifiedsrc/newt/native/MacWindow.m (diff)
Commit 6d341e110912f9085194cb94ba6f6c358104ee71 by Sven Gothel
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).
The file was modifiedsrc/newt/native/MacWindow.m (diff)
Commit 85b332e0954af4afc9225eb84d758bee834dc497 by Sven Gothel
Bug 1421: NEWT OSX Invisible: Implement 'Fake invisible child window'

'Fake invisible child window' is implemented by simply moving the window out of sight (viewport).

- orderOut0 needs to use '[mWin orderWindow: NSWindowBelow relativeTo:..' parentWindow
  instead of '[mWin orderBack:..', otherwise the whole parent application gets invisible w/ SWT ;-)

- NewtNSWindow may also needs to use parent's Screen instance if moved offscreen,
  as the own Screen is invalid (zero size) in this case.

- WindowDriver: Adding special treatment for 'Fake invisible child window' (tagged as such):
-- reconfigureWindowImpl: setWindowClientTopLeftPointAndSize0(..) will be called
   using the viewport's max position -> out of sight.
-- screenPositionChanged: ignore the 'new' position
-- sizeChanged: ignore the 'new' size

This sensitive NEWT change set shall benefit other toolkits being used as parentWindow
besides SWT, as this behavior is the same across MacOS.
The file was modifiedsrc/newt/native/MacNewtNSWindow.m (diff)
The file was modifiedsrc/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java (diff)
The file was modifiedsrc/newt/native/MacWindow.m (diff)
Commit f56adf14deadd4ee8f434ea1293e27bcafdf2a90 by Sven Gothel
NEWT.Window: Add 'StringBuilder append(StringBuilder sb)' supporting building custom efficient presentations
The file was modifiedsrc/newt/classes/com/jogamp/newt/Window.java (diff)
The file was modifiedsrc/newt/classes/com/jogamp/newt/opengl/GLWindow.java (diff)
The file was modifiedsrc/newt/classes/jogamp/newt/WindowImpl.java (diff)
Commit 9263c27e98cb85b5cdff301dcb943a5a40ae6c3b by Sven Gothel
Bug 1421: NEWTCanvasSWT: No action on SWT.Activate, use SWT.FocusIn. Also remove all SWT listener on dispose.

Additionally print more details about the newtChild's state in DEBUG mode.
The file was modifiedsrc/newt/classes/com/jogamp/newt/swt/NewtCanvasSWT.java (diff)
Commit cfdfa7716422e76123c911a8f70bf84a682875e0 by Sven Gothel
Bug 1421: Conclude OSX: Forward SHOW and HIDE events to NewtCanvasSWT instances if 'below notification threshold'

'below notification threshold' here is simply being a child SWT Control of like a Composition or SashForm etc
where these events won't get propagated.
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/swt/TestGLCanvasSWTNewtCanvasSWTPosInTabs.java (diff)
Commit 6c9eedf03a196d8718ddccbb47c0166c7c6267b8 by Sven Gothel
Bug 1421: NEWT OSX Invisible: Refine 'Fake invisible child window' off-viewport position

Ensure it stays out of sight by moving it to 2x width/height of viewport.
Otherwise one could see the child window moving from lower-right to upper-left ;-)
The file was modifiedsrc/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java (diff)
Commit 88cc287a47066c81ee0b385e2e0ca96f027286b3 by Sven Gothel
TestGLCanvasSWTNewtCanvasSWTPosInTabs: Only use 1 Animator to easy example code

Otherwise one would want to pause the Animator instance for the hidden GLWindow,
otherwise such animator with zero visible drawables will become a CPU hog.
The file was modifiedsrc/test/com/jogamp/opengl/test/junit/jogl/swt/TestGLCanvasSWTNewtCanvasSWTPosInTabs.java (diff)