| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
deadlocks and simplify call-tree
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
focusAction() and native focus request on X11/Windows. On both platforms it's not required (proper focus traversion) and AWT would deadlock on Windows
|
|
|
|
| |
(native) impl. doesn't work.
|
|
|
|
| |
incl. native focus request (X11, Windows, OSX)
|
|
|
|
|
|
|
|
|
|
| |
Skip 'mouse move' event w/ same position
- On Windows, the OS sends us multiple event w/o change in position, suppress them
Add Enter/Exit events incl. synthesize 'enter' event for windows/osx
- X11: using native Enter/Leave events
- Windows: using native Leave event (tracking) and synthesized enter event
- OSX: TODO (required for the confined feature, etc)
|
|
|
|
| |
cleanup in X11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
visibility:
- set pointer visible or invisible
confined:
- confine pointer to window, or not
warp:
- set mouse position within the window
Implemented for X11, tested manually with TestGearsES2NEWT (see code for action keys).
TODO: Windows, MaxOSX and Android (limited)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'defer' 1st argument
- Adapt to GlueGen's Lock ChangeSet: e4baba27507ce78e64a150ec6f69fb96f5721a34
- All java callbacks for native have 'defer' 1st argument.
This allows enqueuing resulting events to the EDT if required,
ie. the native thread may not be 'compatible' (MacOSX).
- MacOSX-Native: enqueue key/mouse events and defer:=true for all java callbacks
Since we are comming from a 3rd-party thread (AWT/NSApp-MainThread)
we shall not abuse it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Feature related:
- Added always-on-top
- Added translucency
- Child Window Position
- AWT parent: manual traverse up the tree and calc position on screen
(Problem: the parent view rect is not at the proper position,
but covers the whole frame)
EDTUtil related:
- Works now w/ AWT ot headless (again)
- OSX native JNI callbacks gathering JNIEnv properly
and attaches/detaches thread.
- AWT case: using AWT-Event which properly dispatches our cocoa events
- MainThread (headless) case: Fork off thread w/ main class
and kick off NSApp run().
This leads to same behavior as w/ AWT case.
- Using DefaultEDTUtil
- Cleanup MainThread (implements EDTUtil)
- Currently not used as EDTUtil (osx), just as launcher
- Removed EDTUtil impl code, reuse DefaultEDTUtil
- Cleanup AWTEDTUtil (implements EDTUtil)
- Currently not used as EDTUtil (osx)
|
|
|
|
|
|
| |
reparent/fullscreen)
Window position is not deterministic enough and slows down processing while sync on it
|
|
|
|
| |
setFullscreenEWMH
|
| |
|
| |
|
|
|
|
| |
window-decoration/insets size
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- FullScreen
- lock parent window if child
- X11: more sophisticated EWMH FS usage
- X11: set window 'Above' before FS and at focus
- allow window WM default position at window creation
- default position { -1, -1 } as hint to native WM
to gather a suitable default position
- wait until user-pos or WM-pos reached
- reconfigureWindow*
- allow -1 values for pos/size to mark no-change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
changed ; Enhanced tests; Catch NV/XRANDR/GL bug
X11 fixes
- X11Screen properly uses it's display's connection
decorated in lock/unlock (for ScreenMode etc)
Ensure Screen's size is set if screenMode changed
- ScreenImpl's ScreenModeListener updates it's screen size
so 'external' changes will be detected.
Enhanced tests
- Verify more data rel. ScreenMode
Catch NV/XRANDR/GL bug
- Read TestScreenMode01NEWT/TestScreenMode01bNEWT comments
|
|
|
|
|
|
|
|
|
|
|
|
| |
- don't assume size/pos change - hence don't set window's values, but wait for satisfaction
- don't send resize events on our own, just rely on the event mechanism
- fullscreen: don't wrap action around invisibility from Java, Win7 flashes otherwise.
Clients who benefit from it (X11) impl. it natively.
- fullscreen exit: validate pos/size in case of a child window, like reparenting.
Otherwise the container might gets confused (eg. AWT).
|
|
|
|
| |
redundant DBG_PRINT on _NET_FRAME_EXTENTS
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WindowImpl::reconfigureWindowImpl
Implement proper Inset usage (window decoration size)
- Insets are either polled (updateInsets()) or event driven (insetsChanged())
- Insets are used for size/pos calculations from Java side
- Natural size/pos in NEWT is client-area, ie w/o Insets
- Adding setTopLevelPosition()/setTopLevelSize() for top-level values,
ie including insets
WindowImpl::reconfigureWindowImpl
- Use flags to pass down the requested action to the native implementation
- Impl. all native actions: visible, decoration, reparent, resize, fullscreen
- Always use size/pos in client-area space, impl. shall use Insets to tranform them
- Remove double-setting of (reparent/fullscreen), which where introduced due to buggy impl. code
- Fix return from fullscreen position: Was overwritten with FS position (0/0)
- Fix decoration change: Remove visible toggle - not required, and actually disturbing
X11Windows/WindowsWindow: Added/Fixed Insets impl.
Tests (manual):
- TestSharedContextVBOES2NEWT utilizies proper window layout using Insets
- TestParenting03bAWT uses window layout for reparenting
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeCode:
"XChangeProperty( dpy, w, _NET_WM_STATE, XA_ATOM, 32, PropModeReplace, [ FULLSCREEN, ABOVE ] .."
shall only be issued if entering FS, otherwise [ FULLSCREEN, ABOVE ] will be set on the client
side at leaving FS, which is not intended.
This caused a size reset to fullscreen size/mode.
WindowImpl:
Used WindowImpl.this.width and WindowImpl.this.height, where w and h should be used,
the FS and pre-FS values.
|
|
|
|
|
|
|
|
|
|
| |
Use EDT X11 Display connection (DPY) for whole display/screen/window lifecycle,
but the user utilization (OpenGL, ..).
Only using the same DPY for creation and event dispatching allows catching
WM_DELETE_ATOM 'ClientMessage's.
Sync X11Window.c w/ commit 4dbb8731219212e27c9afb769a1c62b32bd230a6
- remove 'test' code .. use orig lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DisplayRelease0; Using 'EDT' suffix for display arguments
CloseDisplay in same order as creation (ATI)
- This enhanced the erroneous bug 515 (b54497155815852744adb657816cb4057948dae2) situation
with closing the display connections. However, some SIGSEGV still slipped through.
Adding DisplayRelease0
- Intended for cleaning up resources. Currently a NOP.
Using 'EDT' suffix for display arguments
- To mark the semantics of the display connection, which may be for window or EDT now.
|
|
|
|
|
|
|
|
|
|
|
|
| |
9ed513e9a9616f6028084df4c650c8caf31ea49d
In case of exessive destroy/create (the NEWT reparenting test cases),
some dpyEDT events are slipping through the event dispatcher.
This fix uses issues more XSync on both Display connection in case of 'requestFocus'
and 'closeWindow'.
'requestFocus' also uses the dpyEDT to issue the XSetInputFocus(..), since it's EDT related.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libxcb 1.7 bug 20708
See https://jogamp.org/bugzilla/show_bug.cgi?id=502
Since the libX11/xcb code doesn't seem to be fixed anytime soon
a better usable workaround is required than using a system property
to enable 'over locking'.
It turns out that the race condition is related to the parallel
X11 Display connection usage of GLX/OpenGL and event dispatching.
This workaround utilizes 2 X11 Display handles, one for windowing/OpenGL
and one for event dispatching.
This approach allows us to cont. multithreading use w/o locking the display
and works on both implementations, the old bug-free libX11 and the 'new' buggy one.
Downside is the little resource overhead of the 2nd X11 Display connection .. well.
- Removes the property: 'nativewindow.x11.mt-bug'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
separation ; android cleanup
remaining all-in-one jnlp's / jars:
jogl-all-awt.jnlp -> jogl.all.jar
jogl-all-noawt.jnlp -> jogl.all-noawt.jar
jogl-all-mobile.jnlp -> jogl.all-mobile.jar
native for all above: jogl-all-natives-linux-amd64.jar
jogl.all-android.apk jogl.all-android.jar
more may follow for each supported platfrom
++++
- newt: proper 'driver' separation
- all drivers reside now in jogamp.newt.driver.*
- remove intptr.cfg / use gluegen's
|
|
|
|
|
|
|
|
|
| |
trace), cleanup
- X11 Error Handler: if throwing JVM stack trace or fatal JVM error
query proper JNIEnv for running thread and attach thread to JVM if necessary.
- NEWT/X11: Proper XEvent polling documentation, cleanup window creation event mask
|
| |
|
|
|
|
|
|
|
| |
.. (remove local copy)
- Use them for gluegen code generation
- Use them for native compilation (cc)
|
|
|
|
| |
after Java callback
|
|
|
|
| |
modifier properly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jogamp.<module> (2/2) - edit files
- com.jogamp.opengl.impl -> jogamp.opengl
- com.jogamp.opengl.util.glsl.fixedfunc.impl -> jogamp.opengl.util.glsl.fixedfunc
- com.jogamp.nativewindow.impl -> jogamp.nativewindow
- com.jogamp.newt.impl -> jogamp.newt
This sorts implementation details from the top level, ie skipping the public 'com',
allowing a better seperation of public classes and implementation details
and also reduces strings.
This approach of public/private seperation is also used in the OpenJDK.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add WindowListener.windowDestroyed()
To expose a proper window lifecycle, ie destroy-notify and destroyed,
this notification is added.
This will be used at least in unit tests, where we verify destruction.
Remove WindowImpl.windowDestroyed():
This native hook (planned to be called by native destroy notification)
is unreliable or not supported for all platforms.
NEWT relies on the pre destroy native hooks and handles the final
destroy notification itself.
|
| |
|
| |
|
|
|
|
| |
NativeWindow X11.
|
|
|
|
|
|
|
|
|
|
| |
Lifecycle.reparentActionPre()/reparentActionPost() -> pauseRenderingAction()/resumeRenderingAction()
for a more generic use, ie reparenting and screen mode change.
ScreenMode change: No more visibility/fullscreen changes, no more locking,
just pause/resume animation.
X11 ScreenMode set: move from thread/wait to simple polling over time (timeout)
|
|
|
|
|
|
|
|
|
|
| |
DEBUG strings w/ thread name
nativewindow.TraceLock -> nativewindow.debug.ToolkitLock.TraceLock
Sync Xmisc (DummyWindow) with NEWT's creation
test scripts: awt and non-awt usage
|
|
|
|
|
|
|
|
| |
Fix ScreenMode
- Avoid NPE/Out-of-memory: Return zero sized NewIntArrays instead of NULL.
Fix Windows Build
- ScreenMode still has a regression
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- New type definition:
ScreenMode { MonitorMode { SurfaceSize { Resolution, bpp }, ScreenSizeMM, refreshRate }, rotation },
where Resolution and ScreenSizeMM are of type DimensionReadOnly
- ScreenMute instance is
- immutable
- hashable
- cloneable
The above allows fast query and storage w/o redundancies.
More than 300 modes via permutation could be expected.
ScreenMode impl. changes:
ScreenImpl:
To be implemented methods by native specialization:
- protected int[] getScreenModeFirstImpl()
- protected int[] getScreenModeNextImpl()
- protected ScreenMode getCurrentScreenModeImpl()
- protected boolean setCurrentScreenModeImpl(ScreenMode screenMode)
The data unification etc is implemented generic using ScreenModeUtil
and the 'int[]' streaming.
ScreenModeStatus holds all ScreenMode related data
and provides a locking strategy.
ScreenModeListener provides a callback facility for ScreenMode change events.
- Screens listen to ScreenModeStatus, so all FQN referenced Screen's receive the change.
- Windows listen to Screen, to take appropriate action for the event (fullscreen, reshape).
Misc:
- Screen/Display: promoting 'addReference'/'removeReference' to public interface,
so a user may trigger construction/destruction (-> junit tests, plus other clients than WindowImpl).
- Gears: 'setSwapInterval' at 'reshape' instead of 'init',
so it's reset when ScreenMode is changing.
-
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
18bf27fa86da1f26fd085565f501736816d2f2e9
Conflicts resolved:
src/newt/classes/com/jogamp/newt/impl/WindowImpl.java
src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java
src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java
src/newt/native/WindowsWindow.c
src/newt/native/X11Window.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- setSizeImpl/setPositionImpl/reparent -> reconfigureWindowImpl
- setVisible(boolean) is state checked (500ms) for better reliability
on resource creation. Guarantees valid surface.
- reparentWindow: start pos of child -> top is current position on screen
- reparentWindow: Recheck success (setVisible), if failed fall back to recreate,
which gets rid of a lost child windows (1/20) ..
- reparentWindow: if size failed, reconfigure for size again
- add toggle decoration
- unify nfs_ size/pos state
- WindowsWindow.c/X11Window.c: Unify size/pos settings
- X11Window.c:
- NewtWindows_setFullscreen: use 'root of screen' instead of 'default root of display'
- Adding SubstructureNotifyMask incl event semantics
- Parse ReparentNotify (debugging of reparenting)
Misc:
- Add native getLocationOnScreen() impl to avoid possible AWT deadlock
- setSize/setPosition/setFullScreen -> EDT
- More documentation on expected native implementation semantics
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Event of fullscreen is sent to the display root
and properties of fullscreen are set on our window/screen
defined source attachment of data sent using XSendEvent to be normal application (required)
cleaned up the code. replaced tabs with spaces
|
| |
| |
| |
| |
| | |
when true the request is send after configuring the window
otherwize before decoration. needs tweeking to ensure that the fullscreen is on-off
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added screen rotation change capability with impl for X11 (using Xrandr)
com.jogamp.newt.Screen: added 2 methods which cover screen roation lifecycle
setScreenRotation(int rot): Change the Screen Rotation to
one of the rotations defined in ScreenMode, namely:
ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270
int getCurrentScreenRotation(): Get the Current screen rotation
returns -1 if not implemented natively.
+++++++++++++++++++++++++
Notes:
1- At init the original rotation is called natively and cached,
when screen is destroyed the rotation is reverted.
2- On X11 with Nvidia: you need to edit /etc/X11/xorg.conf:
Add the following line:
Option "RandRRotation" "on"
in Section "Device" after BoardName.
+++++++++++++++
Added TestScreenMode02NEWT which includes 4 tests
1- Rotate 90
2- Rotate 180
3- Rotate 270
4- Rotate with screen mode change
should fail if screen rotation not implemented natively.
(4) withh fail if screen mode not impl natively as well.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added screen mode change capability with impl for X11 (using Xrandr)
com.jogamp.newt.Screen: added 4 methods which cover screen mode lifecycle
ScreenMode[] getScreenModes(): Get list of available screen modes
returns null if not natively implemented. On first call
will fetch the list thru a set of native calls and stores them
in the ScreenModeState. Consequent calls will retreive the data
from the ScreenModeStatus object. Native calls are done on creation stage,
so subsequent API calls will return cached data.
int getDesktopScreenModeIndex(): Get the Current Desktop Screen mode index
returns -1 if functionality not natively implemented. The index
returned refers to the screen mode location in the ScreenMode array.
Used to get initial mode for reverting back. Initial call will retreive the
mode thru a native call (done on initialization), subsequent API calls will retreive it
from the ScreenModeStatus object.
Note: If Window is closed without reverting back and screen is set to unreachable.
The api will revert the screen. A call to destoy(unreachable) is needed
for revert to take place on close
windowDestroyNotify(WindowEvent e) {
...
window.destroy(true);
}
short getCurrentScreenRate(): Get the current screen rate
returns -1 if not natively implemented. Used along with getDesktopScreenModeIndex
You can identify the current screen mode (w x h) and the rate. Initial call will retreive the
mode thru a native call (done on initialization), subsequent API calls will retreive it
from the ScreenModeStatus object.
void setScreenMode(int modeIndex, short rate): change the screen mode
to the mode index which refers to one of the screen modes retreived by getScreenModes()
and a rate which can be one of screenModes.getRates(). If the rate provided doesnt belong
to the list of available rates the first rate is chosen.
build-newt.xml: Added header files generation for Screen and Display
Added Xrandr syslink to x11 based builds.
+++++++++++++
Fullscreen for X11Window:
Added Fullscreen WM Hint for X11Window. Event of Fullscreen is
sent to the display root. When changing to fullscreen the request is send
after configuring the window otherwize before decoration.
Not Stable yet, needs tweeking on other Linux dist. Window looses focus
after switching to fullscreen mode.
+++++++++++++++
Added TestScreenMode01NEWT which includes 4 tests
1- Fullscreen change mode
2- Screen mode change
3- Screen change with fullscreen (revert screenmode then revert fullscreen)
4- Screen change with fullscreen (revert fullscreen then revert screenmode)
should fail if not screenmode not implemented on platform.
+++++++++++++++
Cleaned up some unused imports
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindow/NativeSurface Refactoring
- Using NativeSurface interface
- NativeWindow extends NativeSurface, adds getLocationOnScreen(Point)
- NativeWindow add: getParent()
- NativeWindow/Surface: Removed 'invalidate()', use 'destroy()' if you must.
- NullWindow -> ProxySurface impl NativeSurface
- JOGL: Uses NativeSurface only.
- GLDrawable.getNativeWindow() -> GLDrawable.getNativeSurface()
Added mouseClick NEWT/AWT unit test
JOGL:
- GLAnimatorControl add: resetCounter()
-
NEWT:
- GLWindow counters: return GLWindow counters always
- WindowImpl
- requestFocus() wait until done
- reparent: readded requestFocusImpl(true),
native impl skips java focusAction if reparented
- X11Window: Add XRaiseWindow() in requestFocus()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindow: Interface NativeWindow changes:
- Remove 'throws' qualifier in lockSurface(), since it is not
- Adding convenient 'one call' isSurfaceLockedByOtherThread()
- Adding getSurfaceLockOwner()
NEWT Window/GLWindow:
- Unclutter Window/GLWindow relationship - save Window's indentity
GLWindow's role is a GLAutoDrawable implementation aggregating
(maybe even compositioning) a Window.
The previous implementation just derived from the Window implementation,
overwriting methods and fields - impossible to ensure sanity / completness.
It was also not ensured that the added functionality of GLWindow
(setVisible, destroy, ..) has been issued in case of handling the
aggregated Window alone (window callbacks, ..).
To solve this issue in a 1st attempt without changing the GLWindow API,
Window is just an interface, being implemented by their specializations,
hence sanity is intrinsic.
GLWindow's added functionality is ensured by a Window.LifecycleHook
interfaced implementation, registered at the aggregated Window.
- Screen and Window are interfaces now (new files)
- Display is an abstract class.
- Their (abstract) implementations resides in impl/<BaseName>Impl
- GLWindow implements Window as well
- Remove Screen reference handled by setScreen(Screen) method.
- Lock native parentWindow if used (createNative/reparenting)
- Move lockSurface/unlockSurface from unchecked override pattern
to an callback style using abstract methods lockSurfaceImpl/...
- Sorting all methods to semantic sections, abstract, superinterface, ..
- Reparenting: Handling different reparenting situations:
- Unchanged - No change
- Native Reparenting - Compatible Display/Screen, try native reparenting
- Native (Re)Creation - Use destroy/create pattern
- Native Creation Pending - Create later
- setUndecorated() calls reconfigure Window now, ie tries to change the window actually
- Don't issue 'requestFocus()' directly from the native implementation anymore,
call it from the Java code.
- Window/GLWindow/NewtFactory: Constructor simplification
Avoid explosion of constructor overloading, ie removing the 'undecorated' variant,
since this is redundant due to the 'setUndecorated(boolean)' method.
- Fixed/added API documentation
|