aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com/jogamp
Commit message (Collapse)AuthorAgeFilesLines
...
* Bug 935: NEWT PointerIcon: Utilize Toolkit Agnostic PixelFormat and ↵Sven Gothel2014-01-082-22/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conversion Utilities (Allowing 'arbitrary' PointerIcon data input) Commit fe28bc125429b38cdcd016746081f4a6d521c6fd added the notion of toolkit agnostic PixelFormat and conversion utilities, utilized and further tested by this patch. +++ - PointerIcon is a PixelRectangle and hence holds the decoded data. This allows on-the-fly conversion if required as well as recreation w/o PNG re-decoding. - Using array-backed PointerIcon data where possible, allowing better performance when converting PixelFormat etc. - NEWT Display adds 'createPointerIcon(final IOUtil.ClassResources pngResource...' method to support agnostic PointerIcon creation. - NEWT Display adds methods to allow users to avoid PixelFormat and Buffer NIO type forced conversion: - PixelFormat getNativePointerIconPixelFormat() - boolean getNativePointerIconForceDirectNIO() +++ PNGImage -> PNGPixelRect Deleted: com.jogamp.opengl.util.texture.spi.PNGImage Added: com.jogamp.opengl.util.PNGPixelRect (We hope nobody was using PNGImage directly since it was a service-plugin for TextureIO) PNGPixelRect is a PixelRectangle PNGPixelRect actually is implemented OpenGL agnostic, however - since our PNGJ support lives under package 'jogamp.opengl.util.pngj' it cannot be moved up (yet). PNGPixelRect now handles all PixelFormat for the target format and also added support for grayscale+alpha (2 channels). The latter is force-converted to RGB* - similar to paletted. Further more, PNGPixelRect allows simply passing an OutputStream to write the PNG data. Used by: TextureIO and NEWT +++ - OffscreenSurfaceLayer's setCursor(..) uses the agnostic PixelRectangle instead of a PNG resource. - AWTMisc uses the PixelRectangle to produce the AWT Cursor and converts it to the required format. Hence same pixels are used for NEWT and AWT pointer/cursor icon. - TestGearsES2Newt and NewtAWTReparentingKeyAdapter 'tests' iterate over 3 custom PointerIcon when pressed 'c'. - JOGLNewtAppletBase uses the new custom PointerIcon 'newt/data/crosshair-lumina-trans-32x32.png', which is included in NEWT (213 bytes only). -
* JOGLNewtAppletBase Default Key-Action: Add 'j' for setPointerConfined() .. ↵Sven Gothel2014-01-041-0/+9
| | | | i.e. 'jailed'
* Bug 935: NEWT PointerIcon: Refine Spec and Implementation / Fix OSX Crash ↵Sven Gothel2014-01-041-14/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and Issues - Refine Display.PointerIcon: Complete type allowing re-creation - Add associated Display reference - Add used IOUtil.ClassResources reference - Add isValid()/validate() methods for recreation - Refine API doc - Move Display.destroyPointerIcon(PointerIcon) -> PointerIcon.destroy() - Move DisplayImpl.PointerIconImpl -> PointerIconImpl (own source file) - Creation/Destruction and setting of PointerIcon happens on EDT - DisplayImpl.shutdownAll() and Display.destroy() calls destroyAllPointerIconFromList - WindowDriver.setPointerIconImpl: Validates PointerIconImpl (i.e. re-creates if required) - Fix 'initial' window.setPointerIcon(..) before createNative(..), tested w/ TestGearsES2NEWT - OSX Native Code: - Move mouse and pointer-state handling from NewtMacWindow -> NewtView class to retain states (pointer handle, pointer visibility, etc) when reparenting. Reparenting will move an exisiting NewtView into a new NewtMacWindow. - Enable all mouse move events: - NewtView::mouseEnter [nsWin makeFirstResponder: nsView]; - NewtView::mouseExited if( !mouseConfined ) { [nsView resignFirstResponder]; } - NewtView::mouseMoved issued [myCurser set] if required, fixing OSX issue not updating NSCursor properly. - MacWindow: - Test NewtMacWindow, NewtView and NSCursor handles before usage - Fix DBG_PRINT(..) warnings
* Bug 935: NEWT PointerIcon: Add size, hotspot 'getter' and String representationSven Gothel2013-12-311-1/+11
| | | | PointerIcon's size and hotspot maybe be useful for certain user-app calculation.
* Bug 935: NEWT: Expose Pointer Icons Feature in JOGLNewtAppletBase TestsSven Gothel2013-12-311-19/+66
|
* Bug 934, Bug 935: NEWT: Add support for custom Application/Window and ↵Sven Gothel2013-12-314-4/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pointer Icons - Utilizing JOGL's PNG decoder for all icons, if available. - Application/window icons: - Providing default application/window icons in 16x16 and 32x32 size - NewtFactory.setWindowIcons(..) or property 'newt.window.icons' maybe used to override default icons. - Using icons at application/window instantiation - Display.PointerIcons: - NativeWindow Win32 WindowClass no more references a default cursor in favor of fine grained cursor control [in NEWT] - Display provides create/destroy methods, where display destruction also releases open PointerIcon references. - Window.setPointerIcon(..) sets custom PointerIcon - Implemented Platforms - X11 - Windows - OSX - Manual Test: TestGearsES2NEWT (Press 'c')
* NEWT Cleanup - Remove Type Casts and OSX Newt/Fmod Workaround (Early ↵Sven Gothel2013-12-312-12/+7
| | | | WindowImpl initialization)
* Bug 922 (2/2): NEWT Window.reparentWindow(..): Use ↵Sven Gothel2013-12-113-8/+9
| | | | REPARENT_HINT_BECOMES_VISIBLE to ensure GL State Preservation ; Add unit test !
* Bug 922 (1/2): NEWT Window.reparentWindow(..): Provide ↵Sven Gothel2013-12-112-1/+29
| | | | | | | | | | | | REPARENT_HINT_BECOMES_VISIBLE hint via new method variant using hints; Deprecate other reparentWindow(..) variants w/o hints. NEWT Window.reparentWindow(..): Provide REPARENT_HINT_BECOMES_VISIBLE hint via new method variant using hints: - Add REPARENT_HINT_FORCE_RECREATION, covering 'old' forceDestroyCreate boolean argument - Add REPARENT_HINT_BECOMES_VISIBLE, Claim window becomes visible after reparenting, which is important for e.g. preserving the GL-states in case window is invisible while reparenting. Deprecate other reparentWindow(..) variants w/o hints. Use only new variant using hints w/o semantical change.
* Bug 904: 'User Vertical Flip' for GLJPanel w/o vertical flip must be ↵Sven Gothel2013-12-101-1/+1
| | | | considered in AWTTilePainter: 'Origin of GL image is still on Bottom'
* Workaround Bug 910 (IcedTea-Web): NewtCanvasAWT shall postpone JAWTWindow ↵Sven Gothel2013-11-252-20/+25
| | | | | | | | | | | | | | | | | destruction via explicit set flag. IcedTea-Web_1.5pre+rbc73a1362e9c still issues NewtCanvasAWT.removeNotify() before before Applet.destroy(), i.e. removes NewtCanvasAWT from the Container ahead of time (Applet protocol destroy()). However, it fixes the non AWT-EDT issue, i.e. calls NewtCanvasAWT.removeNotify() from the actual AWT-EDT - good. Since the root cause still exist, we cannot use heuristics as described in Bug 910 comment 9, but need to set a flag in NewtCanvasAWT to skip JAWT destruction and remove it latter within Applet.destroy(). NewtCanvasAWT.removeNotify.0 - isApplet true @ [AWT-EventQueue-0, isAWT-EDT true]
* Bug 672 (NewtCanvasSWT): Reuse SWTAccessor.isOS_TYPE ; Impl ↵Sven Gothel2013-11-251-18/+24
| | | | | | | | | | | | | | | | | | | | | NW.getLocationOnScreen(..) for X11 and Windows ; Allow unit test to run on all platforms. - Reuse SWTAccessor.isOS_TYPE (public now) - Impl NW.getLocationOnScreen(..) for X11 and Windows reusing existing native code - Allow unit test to run on all platforms. Note: NewtCanvasSWT unit tests require a 'wait for realized' while SWT dispatching. Otherwise the 'sash unit test' will fail since realiziation happens later, at least on X11. Hence extended AWTRobotUtil.waitForRealized(..) to use a 'waitAction' which is used here w/ special SWT dispatch Runnable. AWTRobotUtil.waitForRealized(..) operates on time-delta instead of iteration-counter, allowing above 'waitAction' Runnable. AWTRobotUtil.waitForRealized(..) removed 2nd 'glad.isRealized()' loop ..
* Bug 672 (NewtCanvasSWT ignore windowing offset on OSX').Petros Koutsolampros2013-11-241-1/+6
| | | | | | | | | | | The NewtCanvasSWT is now brought into place by the parent SWT Composite and the super SWT Canvas it extends. Also added two test cases. One with a simple SashForm and the NewtCanvasSWT in the second cell, and another with the NewtCanvasSWT in a Composite, that Composite now in the second cell of the SashForm. The second test is necessary because the NewtCanvasSWT does not receive SWT.Resize events in this configuration, but only SWT.Paint ones (a behaviour inherited from the super SWT Canvas)
* Workaround Bug 910 (IcedTea-Web): NewtCanvasAWT shall postpone JAWTWindow ↵Sven Gothel2013-11-231-29/+88
| | | | destruction if removeNotify() is called from non AWT-EDT
* JOGLNewtAppletBase's add/remove 'reparentHome WindowListener' at start()/stop()Sven Gothel2013-11-231-20/+21
|
* JOGLNewtApplet1Run: Perform AWT Operations on AWT-EDT ; Remove redundant ↵Sven Gothel2013-11-231-32/+54
| | | | explicit call to reparentWindow(null) @ destroy
* JOGLNewtAppletBase's windowDestroyNotify(): Double check 'awtParent' before ↵Sven Gothel2013-11-231-12/+13
| | | | reparenting 'back to parent'
* NewtCanvasAWT: Remove useless block in else branchSven Gothel2013-11-181-6/+3
|
* jogl: push other call to clearGlobalFocus to the AWT EDTHarvey Harrison2013-11-181-1/+1
| | | | | | | | | Follow-on to commit: d544c839f6df10f20977c786a446833f3aa7ef13 (jogl: do the clearGlobalFocusOwner() call on the AWT EDT in NewtCanvasAWT) Likely this won't hurt anything. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: do the clearGlobalFocusOwner() call on the AWT EDT in NewtCanvasAWTHarvey Harrison2013-11-181-1/+9
| | | | | | | Otherwise we can deadlock in the native focusrequest calls from the AWT thread, see bug 879 for the details. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: simplify conditional that repeats test for isOnScreenHarvey Harrison2013-11-181-1/+2
| | | | | | | | | | | | if (isOnscreen) else if (!isOnScreen) change to if (isOnscreen) else Signed-off-by: Harvey Harrison <[email protected]>
* jogl: add missing @Override annotation in NewtCanvasAWTHarvey Harrison2013-11-181-0/+2
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Fix Bug 893 - NewtCanvasAWT Lifecycle Race Condition (NPE on shutdown ↵Sven Gothel2013-11-181-162/+185
| | | | | | periodically) As suggested: Employ synchronization on lifecycle actions _and_ perform destroyImpl(..) always on AWT-EDT to avoid a deadlock.
* NewtCanvasAWT: Add method of 'isAWTEventPassThrough()', used in unit tests ↵Sven Gothel2013-11-181-0/+14
| | | | to fix event validation for offscreen mode (OSX/CALayer)
* NEWT AWTAdapter*: Don't act if not setup (due to lazy setup mode), refines ↵Sven Gothel2013-11-184-2/+27
| | | | commit 5c6c11abf643013976ecbc0df463a923a1f52696
* NewtCanvasAWT: Use final AWT[Key|Mouse]Adapter and set downstream lazily; ↵Sven Gothel2013-11-181-19/+32
| | | | Consume AWT KeyEvents in downstream mode; Test respects 'consumed' key events.
* NEWT AWTAdapter: Add notion of consuming the AWT InputEvent (will be used ↵Sven Gothel2013-11-184-49/+127
| | | | for key events); Allow AWTAdapter to be lazily setup w/ downstream object.
* Fix Bug 879 Regression (2/2) - NewtCanvasAWT.FocusAction must take focus ↵Sven Gothel2013-11-181-3/+11
| | | | | | | | | when in offscreen-mode (OSX/CALayer) NewtCanvasAWT.FocusAction must take focus when in offscreen-mode (OSX/CALayer) since the NEWT window _is_ offscreen (no input events) and AWT events are translated to NEWT. Regression of commit 0be87f241c0f0b2f5881d9a602ce12378b8e453d
* Fix Bug 879 - Threads deadlock in native keyboardfocus calls made form ↵Sven Gothel2013-11-171-12/+11
| | | | | | | | | | | | | | | | | multiple threads; Fix Bug 892: Reduce Focus Hopping Since we manage focus key traversal ourselves w/o requiring the AWT component to have the focus[1], we simply can drop requesting the focus for 'focus hopping' NEWT -> AWT -> NEWT[2]. Further more, 'MenuSelectionManager.defaultManager().clearSelectedPath()' must be performed on AWT-EDT w/o blocking. Otherwise it may perform blocking tasks on AWT-EDT. [1] Commit cb7118fc875b6722803e4b11d5681671962a8d3a introduced function to query the next or previous 'to be focused' component: AWTMisc.getNextFocus(..) .. etc. [2] Focus hopping is also addressed in Bug 892
* Bug 903 - NEWT: Support 'Continue Drag on Exit'; Consistent Mouse ENTER/EXITSven Gothel2013-11-172-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Support 'Continue Drag on Exit' - Track dragging operation, allow exterior dragging - Hence track EXIT (see below) - Windows: - Capture mouse for exterior dragging - Only 'NewtWindows_trackPointerLeave' if 'entering' - Simplify touch: No 'inside' check - Not required. - Consistent Mouse ENTER/EXIT - Track ENTER/EXIT and synthesize if required, drop duplicate - OSX benefits, since it never produced ENTER/EXIT events - AWT (or other TK) translated events beahve equal now. - Required for EXIT event after ending exterior dragging and final RELEASE Tests: Passed unit tests 'junit.run.newt.event' on - GNU/Linux - Windows7 - OSX 10.7 Tested exterior tracking manually w/ NEWT TestGearsES2NEWT and TestGearsES2NewtCanvasAWT: - GNU/Linux - Windows7 (mouse) - Windows8.1 (touch) - OSX 10.7
* NEWT Window: Expose 'setVisible(boolean wait, boolean visible)' allowing ↵Sven Gothel2013-11-062-5/+21
| | | | applications to not block until window becomes visible.
* Bug 776 GLContext Sharing: Refine API for relaxed and lazy GLContext sharing ↵Sven Gothel2013-10-272-32/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ; Fix GLContext memory contract (volatile) (Unit test remarks see below) - Add shared GLContext queries - Refined GLContextShareSet: - Use IdentityHashMap since GLContext's can only be identical w/ same reference (footprint, performance) - Add API doc for clarification - Add methods: - ArrayList<GLContext> getCreatedShares(final GLContext context) - ArrayList<GLContext> getDestroyedShares(final GLContext context) - Use 'final' where possible - Add GLContext methods: - boolean isShared() - List<GLContext> getCreatedShares() - List<GLContext> getDestroyedShares() - Add GLSharedContextSetter interface defining setting a shared GLContext directly (GLContext) or via a GLAutoDrawable: - setSharedContext(GLContext) - setSharedAutoDrawable(GLAutoDrawable) Both cause initialization/creation of GLAutoDrawable's drawable/context to be postponed, if the shared GLContext is not yet created natively or the shared GLAutoDrawable's GLContext does not yet exist. Most of impl. resides in GLDrawableHelper Implemented in: - GLAutoDrawableBase, GLOffscreenAutoDrawable - GLWindow - AWT GLCanvas TODO: - GLJPanel - SWT GLCanvas - GLDrawableFactory: - Add 'GLOffscreenAutoDrawable createOffscreenAutoDrawable(..)' variant w/o passing the optional shared GLContext _and_ specifying lazy GLContext creation. This allows to benefit from GLSharedContextSetter contract. Lazy GLContext creation is performed at 2st display() call at the latest. All JOGL code and unit tests use this new method now. - Mark 'createOffscreenAutoDrawable(..)' w/ shared GLContext argument and immediate GLContext creation deprecated - shall be removed in 2.2.0 - Make reference to GLContext and it's native handle volatile Since we rely on the query 'GLContext.isCreated()' to properly allow GLAutoDrawable's to query whether a shared GLContext is natively created (already), the handle must be volatile since such query and the actual creation may operate on different threads. +++++ - Add/Refine shared GLContext unit tests demonstrating diff. sharing methods. All variants of using shared GLContext: com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBO* Most convenient way to share via setSharedAutoDrawable(GLAutoDrawable): com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2[NEWT|AWT]3 AWT use w/ JTabbedPane using setSharedAutoDrawable(GLAutoDrawable): com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextWithJTabbedPaneAWT
* PinchToZoomGesture: Add ctor arg 'allowMorePointer', should be false to be ↵v2.1.1Sven Gothel2013-10-191-5/+13
| | | | more stable (i.e. only 2 pointer pressed)
* jogl: avoid creating a second String object, one is enoughHarvey Harrison2013-10-181-1/+1
| | | | | | | One String is already being built, passing it to new String() is just wasteful as the temp String can be returned just as easily. Signed-off-by: Harvey Harrison <[email protected]>
* jogl: add missing @Override annotationsHarvey Harrison2013-10-1728-0/+127
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* jogl: remove all trailing whitespaceHarvey Harrison2013-10-1742-866/+866
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* MouseEvent: Clarify button-number and pointer-ID relation incl. case 'no ↵Sven Gothel2013-10-181-14/+69
| | | | | | | | | | button/pointer', i.e. button == 0, pointer-ID == -1 doPointerEvent: - allow id==-1 -> button==0 for no button, i.e. mouse move doMouseEvent: - keep button 0 value, i.e. map to pointer-ID -1
* AWTPrintLifecycle.setupPrint(..): Fix regression of commit ↵Sven Gothel2013-10-181-6/+8
| | | | | | | | | | | | a05b87a369441d9ef38f97929f866b3d4ced0e57: NULL printGLAD of GLCanvas and NewtCanvasAWT We have to pre-init printGLAD w/ current GLAD (similiar w/ GLJPanel). Also properly define reqNewGLAD: reqNewGLAD = !caps.getSampleBuffers() && ( reqNewGLADOnscrn || reqNewGLADSamples || reqNewGLADSize ); where '!caps.getSampleBuffers() && ( .. )' is due to Bug 830, swapGLContextAndAllGLEventListener and onscreen MSAA w/ NV/GLX does not work.
* Refine Int -> Enum conversion (commit ↵Sven Gothel2013-10-171-5/+30
| | | | | | | 40863632d1428de015099b5967e5136425e99f25), throw IllegalArgumentException if ordinal is out-of-range. Add API doc. - FFMPEGNatives - MouseEvent.PointerType
* PinchToZoomGesture: Validate pointer-IDs, skip if invalid.Sven Gothel2013-10-171-24/+26
|
* NEWT PointerEvent: Unify event processing in new doPointerEvent(..) and ↵Sven Gothel2013-10-171-77/+21
| | | | | | | | | | | | | | | consumePointerEvent(..) - Unifies native mouse and Android's pointer event, ready for Win7 touch Unify event processing in new doPointerEvent(..), which is also invoked from doMouseEvent(..), and consumePointerEvent(). doPointerEvent(..): Validates and modifies event data and finally creates the event, where consumePointerEvent(..) calls gesture handlers and may synthesize events. Unifies native mouse and Android's pointer event, ready for Win7 touch. AndroidNewtEventFactory calls doPointerEvent(..) directly. Removed lots of duplicated pointer event handling code.
* Int -> Enum using EnumClass.values()[ordinal] instead of for-loop - ↵Sven Gothel2013-10-171-4/+14
| | | | FFMPEGNatives's Enums and new MouseEvent.PointerType.valueOf(int)
* MouseEvent: Clarify 'Multiple-Pointer' w/ button[mask] semantics, ; ↵Sven Gothel2013-10-172-32/+103
| | | | | | | | | | | | | | InputEvent: getButtonDownCount() and isAnyButtonDown(); - Clarify 'Multiple-Pointer' w/ button[mask] semantics - Pointer IDs start w/ 0 and are consecutive numbers. - 'button' == triggering pointer-ID - buttonMask in modifiers show pressed button _and_ pointer-IDs - deprecated BUTTON_NUMBER -> use BUTTON_COUNT (name semantics)
* Add efficient set(..all..) to Dimension, Insets, Point and Rectangle of ↵Sven Gothel2013-10-162-6/+2
| | | | NativeWindow's util types.
* AWTPrintLifecycle.setupPrint(..): Add optional tileWidth and tileHeight, ↵Sven Gothel2013-10-151-9/+18
| | | | allowing user to set custom tile size for performance evaluation/tweak
* Bug 861 - NEWT: Unify MouseEvent Processing incl. gesture processingSven Gothel2013-10-158-52/+997
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We processed MouseEvents within NEWT as follows: sendMouseEvent/enqueueMouseEvent -> doMouseEvent, - called by native code to be delivered via consumeMouseEvent (now or later) - events are validated (move/drag, boundaries) - missing events are synthesized (click, enter, ..) as well as in several factories, i.e.: - AWTNewtEventFactory (1:1) - AndroidNewtEventFactory - synthesized events .. (click, ..) - android typed gesture detection (drag -> 1 finger scroll..) The latter enqueues events do Window/Display directly to be consumed by WindowImpl. Then users may have their own gesture detection etc. +++ This change unifies mouse/pointer event processing within NEWT within consumeEvent(..) which represents a common entry point. Gesture processing is now realized w/ a public API - GestureHandler - GestureHandler.GestureListener - GestureHandler.GesureEvent which supplies: - default impl. of optional gesture handlers (scroll, .. - default: enabled) - public API to add/remove gesture-handler and -listener +++ This allows our impl. to scale better in support of more multiple pointer devices (-> Win7/Win8, X11, ..).
* Bug 859: Let TileRenderer detect zero columns and rows in eot() where ↵Sven Gothel2013-10-121-9/+15
| | | | beginTile() throws an EOT IllegalStateException to avoid division by zero
* NEWT Reparent/Fullscreen: Add 'waitForPosition(..)' when reparenting or back ↵Sven Gothel2013-10-091-1/+12
| | | | from fullscreen; JOGLNewtAppletBase: Reparent to pos 32/32, trying to avoid browser window focus/top stealing on X11.
* NewtCanvasAWT Focus Traversal: Remove AWT's requestFocus*() overrides in ↵Sven Gothel2013-10-091-46/+18
| | | | | | | | | | favor of FocusPropertyChangeListener requestFocusNEWTChild() The AWT's requestFocus*() overrides were intended to receive the AWT focus (default) and clear it afterwards to forward the focus to the NEWT component -> requestFocusNEWTChild(). This can be achieved simply by using our FocusPropertyChangeListener and invoking requestFocusNEWTChild() when receiving the focus on the NewtCanvasAWT component.
* NEWT Reparent/Fullscreen: Fixes X11 unsuccessful return to parent window; ↵Sven Gothel2013-10-092-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add reparentWindow(..) top-level position arguments; Misc - Fixes X11 unsuccessful return to parent window On X11 when returning to parent window (-> CHILD), we have to set the window invisible and wait for the result. Otherwise it sometimes happens that the WM's reparent operation fails, i.e. the window won't become a child of desired parent and is positioned randomly. - Add reparentWindow(..) top-level position arguments .. allows bringing the child-window to top-level w/ a desired position. Otherwise the window would be positioned elsewhere as a top-level as the plain reparenting operation. X11 needs to set position and size _after_ making the window visible, otherwise WM may ignore the XConfigureWindow request. - Reparent recreate shall always store the desired position and size On OSX/CALayer when recreation is being used, we need to store the pos/size for later creation. - Tests: Use 'NewtAWTReparentingKeyAdapter' where possible (reparent/fullscreen) instead of duplicating such code. NewtAWTReparentingKeyAdapter: Performs reparenting and fullscreen operations off-thread (i.e. not on AWT/NEW EDT) while decorating the action w/ revoking/restoring the ExclusiveContextThread (ECT). Manually tested 'TestGearsES2NewtCanvasAWT' reparenting and fullscreen on X11, Windows and OSX/CALayer w/ JDK 7u40 successful.