| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| | |
|
| |
| |
| |
| | |
creation on AWT thread (may deadlock)
|
| |
| |
| |
| |
| |
| | |
d644e9321dceeecdd94a1797e25e6e356d957c23)
Missed build-nativewindow.xml commit
|
| |
| |
| |
| | |
- need to set setFocusable(true) manually due to z-order (newt child upfront)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
KeyListener handling (Bug 526)
NativeWindow:
- expose 'hasFocus()'
Window:
- 'protected enqueueRequestFocus(..)' -> 'public requestFocus(boolean wait)'
- New: 'setKeyboardFocusHandler(KeyListener)' allowing focus traversal co-op w/ covered TK (AWT)
WindowImpl:
- Impl Window changes (see above)
- Impl 'consumedTag' see commit 3b38957f36d4f89b85730755a41c00892ac70591
NewtCanvasAWT:
- FocusAction only removes the global AWT focus owner.
This fixes a deadlock on the Windows platform of AWT's native peer requestFocus impl,
since it's no more called at this point.
- NEW FocusTraversalKeyListener is set as the newtChild's KeyboardFocusHandler,
allowing traversal to the next/previous AWT component.
AWTParentWindowAdapter:
- focusGained(..) clears AWT focus and propagates focus to Newt child,
non blocking w/ 'requestFocus(false)' (see above)
KeyEvent:
- Document limitations of getKeyChar() (Bug 526)
MacWindow:
- only deliver keyChar on key Typed events, harmonizing platform behavior (Bug 526)
WindowsWindow:
- regenerate the keyCode for EVENT_KEY_TYPED (Bug 526)
X11Windows:
- complete keyCode mapping X11 -> Newt - X11KeySym2NewtVKey()
- only deliver keyChar on key Typed events, harmonizing platform behavior (Bug 526)
Tests:
- GearsES2: Make focus visible
- TestParentingFocusTraversal01AWT: unit test for keyboard focus traversal w/ NewtCanvasAWT
|
| |
| |
| |
| | |
which ends event propagation if attach to an InputEvent.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
AttachJAWTSurfaceLayer() OSXUtil -> MacOSXJAWTWindow
Threading/sync issue when creating a NEWT window, which issues a Java callback from native code (positionChanged()).
The latter requires a location validation w/ getLocationOnScreen() involved.
Hence getLocationOnScreen() shall not lock the JAWT native resources,
since it may not be ready yet (-> threading/sync issue).
|
| | |
|
| |
| |
| |
| | |
.. need to move the attach/detach surface layer NIO methods to a AWT OSX class.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
instance ; Applet's on OS X are working
Generalize OffscreenLayerSurface
- Using new OffscreenLayerSurface allows using this functionality in a clean manner,
ie. no 'dirty' usage of MacOSXJAWTWindow in a JOGL GL class.
- 'Promoting' OffscreenLayerSurface functionality to JAWTWindow
and it's handling to GLDrawableFactoryImpl::createGLDrawable().
- Move MacOSXCGLDrawableFactory's "MacOSXJAWTWindow getLayeredSurfaceHost(NativeSurface surface)"
to NativeWindowFactory "OffscreenLayerSurface getOffscreenLayerSurface(NativeSurface surface, boolean ifEnabled)"
Use local JAWT instance
- Only w/ a local JAWT instance per JAWTWindow it is possible to switch between
offscreen-layer and onscreen. We also have to determing offscreen-layer lazy
at surface lock, since only at that time we have knowledge whether it's an Applet
or not.
+++
ContextUpdater:
Use local pthread mutex, add DEBUG output
JAWTWindow/NewtCanvasAWT:
Adding methods to request offscreen-layer-surface (if supported),
besides 'if applet' this may trigger the new functionality.
+++
Applet's on OS X are working:
- OS X 10.6.4
- Safari:
- Hangs for a while at start .. whole screen freezes .. approx. 10s
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input isn't assigned sometimes.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- Firefox 8.0:
- Hangs for a while at start .. whole screen freezes .. approx. 10s
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input is never assigned.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- OS X 10.7
- Safari:
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input isn't assigned sometimes.
- Otherwise .. works well, incl. offscreen/onscreen parenting
- Firefox 8.0:
- Sometimes crashes when Applet stops - after all our resources are released!
- Keyboard input is never assigned.
- Otherwise .. works well, incl. offscreen/onscreen parenting
|
| |
| |
| |
| |
| | |
It turns our that the native ContextUpdater does not work reliable in all cases,
hence we need to verify if the drawable size has changed as well.
|
| |
| |
| |
| |
| | |
MutableGraphicsConfiguration allows derivations to set the chosen capabilities,
hence it is a non public API from which eg. JOGL GraphicsConfiguration derive.
|
| |
| |
| |
| |
| |
| | |
reparenting
Test: enable NEWT 'onscreen' case
|
| |
| |
| |
| |
| |
| |
| | |
- AnimatorImpl: evaluate double negation
if(!skipWaitForCompletion(Thread)) -> if(blockUntilDone(Thread))
- Simplify finishLifecycleAction() and reduce timeout
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I was too fast introducing these accessors, since they are currently not needed
and hence redundant.
Complete
- 7bc4c218b47033cb66f4eb5e707a86a0a4e60cff
Partial in regards to the holder interfaces only:
- d8fa00d35a49f4faf5f04aeb7e2bba4e972965f5
- f51e3dad6c4bd1f6d0001cecf6a0f692400ed602
- 46542168d64b37f544f61802693f15b59b224e4e
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
attach/detach our GL one
- it seems to be more stable, having one root CALayer attached to the JAWT_SurfaceView forever
- tackles crach at GL layer destruction
- proper release of all GL layer resources
- now final [gl-layer dealloc] happens at very destruction of JAWT object,
even though it was removed from root-layer earlier (and all other references)
- see comment in MacOSXWindowSystemInterface-pbuffer.m :: createNSOpenGLLayer(..)
- at least no more crash .. and resource release ASAP, but the GL-layer itself (see above)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
51ad6992e068f25d86d2c9e085bd7ec6f49d2432)
Even though this is not a bug, but it changes the expected EDT lifecycle and hence
would require to change our test cases.
Only flip screen's reference count (which may lead to create/destroy of the EDT)
in the recreate case, where it's needed.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While impl. recreation for offscreen surfaces @ WindowImpl.setSize(),
commit 51ad6992e068f25d86d2c9e085bd7ec6f49d2432, it appears Animator deadlocks in some cases.
finishLifecycleAction() [blocks until pause() .. is accomplished]
queries whether we are even able to wait using skipWaitForCompletion().
The latter method can only query if we are on the animation thread or AWT-EDT, etc,
but not if we have traversed through a 3rd party thread, eg NEWT EDT.
This patches limits the wait with a timeout of 20frames @ 60Hz (20*16ms).
|
| |
| |
| |
| |
| | |
In case of offscreen surfaces (pbuffer, ..) we have to go through
a whole destroy/setSize/create cycle.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Impl. SurfaceChangeable (regression 8f5465396fe429ce6b7ecae808416691271c7867)
- offscreenSurfaceLayer code requires instanceof SurfaceChangeable
- overwrite JAWTWindow size getter: use surfaceSizeChanged() values if used.
Proper invalidateNative()
- detach JAWTSurfaceLayer if set
- destroy dummy NSWindow (was typo)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
updateGraphicsConfiguration() of commit 46542168d64b37f544f61802693f15b59b224e4e
While introducing NewtCanvasAWT's lifetime reference of (JAWTWindow) nativeWindow
using updateGraphicsConfiguration() to determine the actual config values at addNotify(),
it was overseen that the AWTGraphicsDevice needs to be re-validated.
JAWTWindow's validateNative() ensures that the AWTGraphicsDevice reflects the platform
native handle where required (X11).
|
| | |
|
| |
| |
| |
| | |
(regression from commit 46542168d64b37f544f61802693f15b59b224e4e)
|
| |
| |
| |
| | |
46542168d64b37f544f61802693f15b59b224e4e)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
conflicts with setSize()
This fixes the NEWT OffscreenWindow conflict w/ setSize()
which represents the action of changing the window's size.
SurfaceChangeable's surfaceSizeChanged() merily notifies the actual size.
JAWTWindow: Remove setSize() since it propagates the surface size upstream only.
MacOSXJAWTWindow is not SurfaceChangeable complete (no surfaceSizeChanged).
|
| | |
|
| | |
|
| |
| |
| |
| | |
- Also make layout nice ..
|
| | |
|
| |
| |
| |
| |
| |
| | |
Undo parts of commits in this regard:
- 46542168d64b37f544f61802693f15b59b224e4e: move method back to ReparentAction
- f51e3dad6c4bd1f6d0001cecf6a0f692400ed602: remove added ref counter / flag
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Better JAWT* name for offscreen layer surface:
- MacOSXCGLDrawableFactory, JAWTUtil, JAWTWindow, MacOSXJAWTWindow
- FIXME: Need to get rid of the cached JAWT instance,
in case we like to have dual usage of offscreenLayerSurface and onscreen.
This would be done implicit by using NEWT .. hence low prio.
AWTGraphicsConfiguration:
- Fix create(): Use capsRequested for AWT aligned caps if capsChosen is null.
(was capsChosen .. which is null)
- Add updateGraphicsConfiguration() which allows to update the AWTGraphicsConfiguration.
NewtFactoryAWT:
- Add updateGraphicsConfiguration() .. entrypoint for AWTGraphicsConfiguration.updateGraphicsConfiguration()
NSOpenGLLayer Impl:
- For 'some reason' the layer's position is initially negative, fix it @ 1st 'draw'
- Re-add CVDisplayLink OpenGL setting .. for what it's worth .. I don't know
JAWTWindow:
- Remove test setting: Only enable offscreenLayerSurface for applets if avail.
(New unit test enables it seperatly)
NewtCanvasAWT:
- If NEWT child is offscreen, attach AWTMouseAdapter and AWTKeyAdapter
to route these AWT input events to NEWT.
- Don't loose-focus if NEWT child is offscreen.
- Impl. NativeSurfaceHolder, NativeWindowHolder
- NativeWindow is created at construction
and it's GraphicsConfiguration updated at addNotify(..).
- At addNotify/reparent: try harder to determine proper NEWT child size:
- use preferred size if set
- use minimum size if set
- subtract insets from container size
OffscreenWindow/WindowImpl:
- Allow setSize() .. currently NOP for offscreen.
- WindowImpl: Commented out recreate case for offscreen-setSize ..
TEST: com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01AWT
Passed tests:
- GLCanvas
- NewtCanvasAWT/OffscreenWindow
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
WindowImpl:
- Impl. NativeSurfaceHolder/NativeWindowHolder 'hooks'
- setScreen() utilize proper screen reference count/destruction:
- set 'screenReferenceAdded=true' and incr. ref-count,
hence next destroy() properly decr. ref-count (may destuct screen).
OffscreenWindow:
- Allow parent window handle (simply ignore it)
Otherwise we could not use OffscreenWindow for parenting tests.
- Fix setSize() propaget if !isNativeValid() instead of !isVisible(),
otherwise lazy initialization doesn't work.
- Allow reconfigureWindowImpl() to pass flags other than visible,
simply ignore them.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
JAWTWindow:
- Add comment about caller of cstr, since it uses reflection
- Field 'config' is of type AWTGraphicsConfiguration, validate and type it
- Impl. NativeSurfaceHolder/NativeWindowHolder 'hooks'
MacOSXJAWTWindow:
- Use agnostic JAWTUtil.isJAWTVersionUsingOffscreenLayer()
to determine 'isOffscreenLayeredSurface'.
We may promote this notion to JAWTWindow, which already holds 'isApplet'
- lockSurface() case 'isOffscreenLayeredSurface':
- Create dummy NSWindow (OSXUtil) for getWindowHandle()
- Fix chosen caps: offscreen
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- NativeSurfaceHolder interface allows access to it's implementation's NativeSurface reference.
- NativeWindowHolder interface allows access to it's implementation's NativeWindow reference.
Implement or extend interface w/ these accessors whereever it seems fit:
- NEWT Window
- GLDrawable
These accessors allow lower layers to retrieve the NativeSurface/Window instance
w/o knowledge of the 'upper' frameworks, ie. NativeWindow/JOGL or JOGL/NEWT.
Commited in followups (due to mixed semantical changes in those files):
- JAWTWindow
- NewtCanvasAWT
- Some NEWT impl.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Undo 368cbf4462d7f3635c1ef4497424c360b5ccc203:
- "use SurfaceUpdateListener() to notify layer", simply use MacOSXCGLContext's swap impl.
MacOSXCGLContext:
- NSOpenGLImpl.create():
- issues createNSOpenGLLayer() using tex-size (maybe POT) as args
- attaches the NSOpenGLLayer to the JAWT layered surface host
- NSOpenGLImpl.setSwapInterval() propagates interval to our NSOpenGLLayer impl.
- NSOpenGLImpl.swapBuffer() (layer case):
- waits for v-sync if enabled (v-sync), or until native 'draw' is finished (tearing)
using our pthread/ NSOpenGLLayer synchronization.
The latter uses CADisplayLink or CVDisplayLinkRef for v-sync synchronization.
- flushes our local ctx
- triggers our NSOpenGLLayer to 'draw'
- MacOSXPbufferCGLContext create() sets the texture size independently of pbuffer size (POT/NPOT)
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
features, used by pbuffer drawable before a current context.
- Also extract getNextPowerOf2() -> GLBuffers (remove redundancy)
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- attributes +NSOpenGLPFANoRecovery +NSOpenGLPFAAccelerated
- use SurfaceUpdateListener() to notify layer
- swapBufferImpl() adapt to 0038e2d41825c22bdd18a7b86a8229a3fab674a3
- pbuffer: don't enforce POT tex-size to surface size, but pbuffer only
- FIXME: Check POT pbuffer/tex-size for X11/Win32/.. !
-
|
| |
| |
| |
| | |
offscreen/pbuffer, but respect GLDrawableImpl's decision (double-buffer)
|
| |
| |
| |
| | |
This allows allowing updateHandle()/destroyHandle() to be called.
|
| |
| |
| |
| | |
- SurfaceUpdateHelper contains impl. used by NativeSurface implementations.
|