aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
Commit message (Collapse)AuthorAgeFilesLines
* Fix Bug 770 and 771Sven Gothel2013-07-022-42/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 770: X11Window.c: - Request focus _before_ enabling EWMH flags (fullscreen or above) after resize and temporary invisibility. This actually allows us to keep the focus after resize and repositioning! - Set _NET_WM_BYPASS_COMPOSITOR implicit analog to _NET_WM_STATE_FLAG_ABOVE - Clean up _NET_WM_* flag names, avoiding name space collisions, i.e. adding FLAG! - Remove dead _NET_WM_STATE setting via direct window property (not working anyways) - Remove dead code: FS_GRAB_KEYBOARD X11/WindowDriver.java: - Enable _NET_WM_STATE_FLAG_ABOVE temporarily if FLAG_IS_FULLSCREEN && !FLAG_IS_ALWAYSONTOP - Override focusChanged(..) to react on focus lost/gained in case of temporarily enabled _NET_WM_STATE_FLAG_ABOVE. If focus is lost, disable _NET_WM_STATE_FLAG_ABOVE, otherwise re-enable it. WindowImpl.java: - FullscreenAction.run: Always use 'FLAG_IS_FULLSCREEN_SPAN' +++ Bug 771: WindowImpl.java: - Keep fullscreenMonitors and fullscreenUseMainMonitor values intact, allowing them to be tracked. Remove duplicates in FullscreenAction class. - MonitorModeListenerImpl.monitorModeChanged: Add fullscreen path: If the changed monitor is part of fullscreenMonitors, recalculate the viewport union and reset position and fullscreen-size. - MonitorModeListenerImpl: Try to regain focus after successful mode change.
* MonitorDeviceImpl: No need to nanoTime() ..Sven Gothel2013-06-301-6/+6
|
* ScreenImpl: Fix ScreenMonitorState add/remove reference, which shall only ↵Sven Gothel2013-06-301-13/+11
| | | | | | | happen at actual native create and destroy. .. otherwise usage of Screen.createNative() and a later Window creation would cause the ScreenMonitorState having 2 added listener - which in turn disables it's orig mode reset at Screen destruction.
* X11 RandR: Cleanup RandR impl. selection, RandR13 setMode does not require a ↵Sven Gothel2013-06-304-26/+35
| | | | temp. display connection!
* Add Comparable<?>: Point*, Dimension*, Rectangle*, SurfaceSize* and ↵Sven Gothel2013-06-301-1/+7
| | | | | | | | | | | MonitorMode* ; Sort List<MonitorMode> in descending order to be well determined. Add Comparable<?>: Point*, Dimension*, Rectangle*, SurfaceSize* and MonitorMode*: - Compare square values - See API doc for order of special semantics (flags, rotation, ..) Sort List<MonitorMode> in descending order to be well determined: - Removes order by native mode id, give user a reliable natural order.
* NEWT WindowImpl/GLWindow: @ JVM Shutdown, force stop animation thread w/o ↵Sven Gothel2013-06-251-3/+14
| | | | blocking.
* NEWT: EDTUtil.invokeStop(..) gets 'wait' argument, allowing non-blocking ↵Sven Gothel2013-06-254-10/+20
| | | | shutdown. DisplayImpl.shutdownAll(): Don't block.
* NEWT: Don't invoke external keyboardFocusHandler for auto-repeat keys ↵Sven Gothel2013-06-241-3/+3
| | | | | | (NewtCanvasAWT, ..) .. otherwise an auto repeated key would cause fast focus traversal, not intended.
* NEWT Windows WindowDriver: Suppress LOCK_SURFACE_CHANGED, no semantics in ↵Sven Gothel2013-06-241-1/+6
| | | | | | GLDrawable on Windows. FIXME: Validate against EGL surface creation: ANGLE uses HWND -> fine!
* Fix Bug 761 (part 2/2): NEWT registers one customShutdownHook @ ↵Sven Gothel2013-06-233-35/+108
| | | | | | | | | | | | | | | | | | | | | | | NativeWindowFactory.shutdownHook head, allowing proper resource cleanup. 1 WindowImpl.shutdownAll(): - For all instances: - mark invalid (causes any user thread to disregard the window) 2 ScreenImpl.shutdownAll(): - Removed own shutdown-hook! - For all instances: - Reset ScreenMonitorState 3 DisplayImpl.shutdownAll(): - For all instances: - Remove EDT - closeNativeImpl Manually tested on X11 w/ NV and ATI Catalyst (fglrx) - DFLAGS="-Djogl.debug.GLDrawable -Dnativewindow.debug.X11Util -Dnativewindow.debug.NativeWindow -Dnewt.debug.Display -Dnewt.debug.Screen -Dnewt.debug.Window" - java $DFLAGS com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -time 2000 -sysExit testExit - valid arguments for sysExit: testExit, testError, displayExit, displayError
* NEWT/X11: Proper static initSingleton() sequence.Sven Gothel2013-06-233-5/+6
|
* Fix regression of 31e72d2f2d953352b2a8c83368039ecca8139d49: Modifier SHIFT ↵Sven Gothel2013-06-171-2/+3
| | | | needs to be recognized (-> horiz. scroll)
* Fix Bug 688: Removal of NEWT KeyEvent.EVENT_KEY_TYPED and ↵Sven Gothel2013-06-174-9/+3
| | | | KeyListener.keyTyped(KeyEvent) - Part2: API Documentation and Comments
* Fix Bug 688: Removal of NEWT KeyEvent.EVENT_KEY_TYPED and ↵Sven Gothel2013-06-171-33/+1
| | | | KeyListener.keyTyped(KeyEvent)
* Adapt to GlueGen commit 1a01dce6c42b398cdd68d405828774a3ab366456Sven Gothel2013-06-111-14/+11
|
* NEWT: MouseEvent Ctor: Use proper float[] rotationXYZ and float ↵Sven Gothel2013-05-164-28/+43
| | | | rotationScale arguments.
* Fix Bug 723: Remove VK_KP_<Cursor> numpad key-codes, use general VK_<Cursor> ↵Sven Gothel2013-05-162-12/+4
| | | | | | | | | | | | | | | | key-codes; Respect numpad printable keys; Use keySym for numpad if possible. - KeyEvent keyCode/keySym values re-ordered! - Remove VK_KP_<Cursor> numpad key-codes, use general VK_<Cursor> key-codes. Numpad cursor keys are not supported on some platforms (Windows), or not configured on most X11 configurations. - Respect numpad printable keys, i.e. don't treat them as non-printable. - Use keySym for numpad if possible. Numpad keys require modifiers, hence X11 and Windows shall return keySym.
* Fix NEWT MultiMonitor Regression: Use case w/o attached monitor, and NPE ↵Sven Gothel2013-05-092-9/+24
| | | | | | | | | (Cache) in ScreenImpl.getVirtualMonitorDevice(..). W/ RandR13, we can have a case of an Output/CRT w/o valid modes, indicating a switched off or detached monitor. ScreenImpl.getVirtualMonitorDevice(..) requires a Cache .. due to MonitorModeProps.streamInMonitorDevice(..)
* NEWT MonitorMode: Refine 081177f2433be50e3b5d46385c2f0f3f96311ed8: Reduce ↵Sven Gothel2013-05-071-1/+1
| | | | EDT roundtrip when resize/positioning on MonitorMode changed ..
* NEWT Multiple Monitor Mode: Fix monitorModeChanged(..) event id, ↵Sven Gothel2013-05-073-9/+11
| | | | WindowImpl.monitorModeChanged(): Resize/position if not fitting into virtual screen viewport.
* NEWT Multiple Monitor Mode: Add missing 'collect' impl. for NEWT/AWT impl.Sven Gothel2013-05-071-4/+43
|
* MonitorMode: Fix API doc / comments / names.Sven Gothel2013-05-076-41/+41
|
* Fix Bug 600 and Bug 721: Adding support for multiple monitors w/ NEWTSven Gothel2013-05-0621-927/+2224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Support for all monitor devices and their available modes - X11: Use RandR 1.3 if available - Retrieve information - Changing a monitor device's mode - Support for dedicated and spannig fullscreen - See <http://jogamp.org/files/screenshots/newt-mmonitor/html/> - TODO: - X11 RandR does _not_ relayout the virtual screen size and neither the CRT's viewport. We may need to relayout them if they were covering a seamless region to achieve same experience! - OSX: No machine to attach a secondary CRT -> TEST! - Tested Manually for Regressions - Linux ARMv6hf (Rasp-Pi/BCM, Panda/X11) - Android (Huawei, Kindle) - Tested Manually and junit: - X11/Linux - NV, ATI-Catalyst w/ 2 CRTs - VBox w/ 4 CRTs - Win/Windows - NV, w/ 2 CRTs - VBox w/ 4 CRTs - X11/OpenIndiana, NV, 1 CRT
* Bug 721: NEWT/X11 RandR 1.3 Support - Part 2 - Rename impl class/files, ↵Sven Gothel2013-04-195-25/+132
| | | | start RandR13 coding.
* Bug 721: NEWT/X11 RandR 1.3 Support - Part 1 - Delegate RandR functionality ↵Sven Gothel2013-04-184-194/+267
| | | | to pluggable impl. for RandR 1.1 and 1.3 (todo)
* NEWT/AWT-Wrapper-Driver: Fix MS-Windows Case (Use NativeWindow window ↵Sven Gothel2013-04-142-83/+106
| | | | handle); Use set size by frame only for OSX/CALayer
* NEWT/AWT: Fix 'AWT driver' to work w/ OSX CALayer ; WindowImpl: 'Object ↵Sven Gothel2013-04-133-48/+105
| | | | | | | | | | | | getWrappedWindow()' -> 'NativeSurface getWrappedSurface()' WindowImpl: 'Object getWrappedWindow()' -> 'NativeSurface getWrappedSurface()' - AWT driver itself instantiates the JAWTWindow for eager initialization at createNative(). Fix 'AWT driver' to work w/ OSX CALayer - See above - size reconfig changed to ease OSX CALayer, i.e. set frame's size if already visible reducing CALayer artefacts.
* LinuxEventDeviceTracker: Reapply changes from commit ↵Sven Gothel2013-04-111-4/+4
| | | | b13868b612689307ebf4e46ee4ede2fd0560e504, which got lost via my merge conflict resolution (duh).
* Merge remote-tracking branch 'xranby/NEWT-input'Sven Gothel2013-04-111-762/+831
|\ | | | | | | | | Conflicts: src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java
| * LinuxEventDeviceTracker: ALT, ALT_GRAPH & CTRL modifiers.Xerxes Rånby2013-04-091-4/+37
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * LinuxEventDeviceTracker: 4 space indentationXerxes Rånby2013-04-091-798/+798
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * LinuxEventDeviceTracker: shift-modifierXerxes Rånby2013-04-091-27/+63
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
* | NEWT KeyEvent: Use UTF-16 UniCode for key-code and key-symbol exposing well ↵Sven Gothel2013-04-118-47/+549
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defined key encoding and simplify usage. Note, we use one collision to reduce key-code range: [0x61 .. 0x78] keyCodes [F1..F24] collide w/ ['a'..'x'] Since keyCode/Sym won't use lower capital a-z, this is a no isssue. KeyEvent: - 'printable' type is being determined by a nonPrintableKeys table, while 'action' type is set in case !printable and !modifier. - public ctor hidden, use create(..) method instead. This allows us to ensure modifier bit are properly set (incl. the keySym one) w/o performance loss. - ctor validates that only one of the type flags is set, printable, modifyable or action. WindowImpl: - Using IntBitfield of 255 bits to track pressed state, while removing the repeat state tracking since it is redundant. The Windows impl. uses a single field to validate whether a key was already repeated or not. - Properly cast keyCode short values to int for tracking! AWTNewtEventFactory, SWTNewtEventFactory: - Add translation of keyCode/Sym from and to NEWT - All tested via: - Newt -> Awt for AWTRobot - OSX CALayer: AWT -> NEWT - SWT tests X11: - Add VK_CONTEXT_MENU mapping (XK_Menu) LinuxEventDeviceTracker: - Fix apostrophe and grave mapping, i.e. to VK_QUOTE and VK_BACK_QUOTE. Adapted all unit tests, especially: - TestNewtKeyCodesAWT: More fine grained keyCode ranges to test using proper keyCode symbols.
* Bug 641 NEWT/OSX Deliver keySym, derived from the current layout's ↵Sven Gothel2013-04-081-4/+17
| | | | lower-case UTF-16 character.
* NEWT KeyEvent: More tight definition of isPrintable(), i.e. must have ↵Sven Gothel2013-04-082-3/+3
| | | | defined keyCode [and keyChar]; VK_KEYBOARD_INVISIBLE -> isActionKey
* Bug 641 NEWT: X11 Deliver keyCode layout independent, keySym layout ↵Sven Gothel2013-04-082-11/+21
| | | | | | | | | | dependent and UTF-16 keyChar value On X11, the layout dependent keySym was not delivered [1], as well as the UTF-8 to UTF-16 translation was missing [2]. [1] is solved using XLookupString w/o ShiftMask [2] is solved using JNI's NewStringUTF, which takes UTF-8.
* Bug 678: Differentiate ALT (left) and ALT_GRAPH (right) on X11, EventDev, ↵Sven Gothel2013-04-062-2/+2
| | | | | | | Windows and OSX - X11: Memorize pressed Alt_R to decide which 'alt' has to be used for non key modifier fetching - Windows: Only use GetKeyState(..) and compare the US vkey, since int. kbd layout use reduced scancode
* Bug 707: Fix NEWT EVENT_MOUSE_EXITED not sent on Windows - Regression of ↵Sven Gothel2013-04-051-5/+6
| | | | | | | commit 85338858f5c58694fa88e77df1386d0556887944 Commit replaced enqueueMouseEventID w/ sendMouseEventID, while not removing the 'jboolean wait' argument. This also lead to staying in DRAGGED mode when mouse left the window.
* NewtBaseActivity: Move setVisible(false) from onPause() -> onStop(), since ↵Sven Gothel2013-03-291-4/+4
| | | | only onStop() declares invisible status. onPause() could imply other non fullscreen activity on top.
* Adapt to new version scheme, see GlueGen ↵Sven Gothel2013-03-281-1/+1
| | | | | | | a3f2ef50ad33c58a240a17fcf03e415d772207c3, etc; Fix NewtVersion, NativeWindowVersion and NewtVersionActivityLauncher NewtVersion, NativeWindowVersion: Also search for extension javax.media.opengl (all packaging) NewtVersionActivityLauncher: Use new launcher URI
* NewtBaseActivity: Perform cleanup() even on onCreate() due to possible call ↵Sven Gothel2013-03-281-10/+55
| | | | | | w/ initialized states (App process is killed for memory exhaustion etc) .. even though I was not able to reproduce this case, it will not harm.
* Android/NEWT MouseEvent: Fix Detection/Processing of 2-Finger-Scroll Gesture ↵Sven Gothel2013-03-241-81/+143
| | | | | | | | | | | | | | | | | - Part 2 Multiple tests on different devices disclosed that: - 1 of 2 pointers get disconnected every now and then .. -> Shall tolerate this case - dist-delta within gesture may shrink below doubleTouchSlope -> Remove constraint after gesture detection - Always validate pointer-id GearsES2 - Works quite stable on several devices now - Moved soft-keyboad show to 4-pointer pressed >= 0.7f pressure
* Newt/MouseEvent: Add 'float[3] getRotation()', getWheelScale() -> ↵Sven Gothel2013-03-241-21/+14
| | | | | | | | | | | | getRotationScale(), refinement of commit 18cb57246372eda72c25a5cd9a69a873bdf09489 Turns out the 'wheel' semantics are not generic enough and confining rotation values to one axis only satisfies the traditional mouse wheel. Widen the definition of 'rotation' and delivering 3-axis if supported. On NEWT/Android, we deliver the 2-axis for example, allowing to rotate around both or scrolling using both directions (-> GearsES2).
* Android/NEWT MouseEvent: Fix Delivery of MultiTouch PRESSED/RELEASE; Fix ↵Sven Gothel2013-03-241-146/+194
| | | | | | | | | | | | | | | | | | | | | | | | Detection/Processing of 2-Finger-Scroll Gesture ; GearsES2: Add NEWT based 'zoom' gesture detection. - Fix Delivery of MultiTouch PRESSED/RELEASE Adopting MouseEvent changes of commit 18cb57246372eda72c25a5cd9a69a873bdf09489 - Fix Detection/Processing of 2-Finger-Scroll Gesture Dropping utilization of Android's GestureDetector and implementing our own, which turns out to simplify keeping track of states. Our gesture detection works well w/ user NEWT based gesture detection (-> See GearsES2 zoom and rotate), using following criteria related to Android parameter: - ScaledDoubleTapSlop: - Max 2 finger distance - ScaledTouchSlop: - Min. movement w/ 2 pointer withing ScaledDoubleTapSlop starting 'scroll' mode - Max. change of finger distance in respect to initiating 2-finger distance (2x ScaledTouchSlop) - Max. distance growth in respect to initiating 2-finger distance. - GearsES2: Add NEWT based 'zoom' gesture detection.
* NEWT/Android: Fix suspense regression of commit ↵Sven Gothel2013-03-231-2/+6
| | | | | | | | | | d514ecbf052d013ea8c0982c490757678075a9ea Explicit win.destroy() shall only be called at activity.onDestroy(), - GLStateKeeper preservation is marked at pause, - and the Window's surfaceDestroyed() will also issue destroy() - so it's safe Reason: On Suspense (or power button), application is paused _without_ surfaceDestruction !
* NEWT/Android (Bug 665): Add Support for GLStateKeeper ; onPause() always ↵Sven Gothel2013-03-224-52/+165
| | | | | | | | | | | | | | | | | | | destroys ; Recognizing all GLAutoDrawable's GLAnimatorControl for pause/resume ; Use GLAnimatorControl instead of Animator - Add Support for GLStateKeeper If !isFinishing() (HOME button), preserve the GLEventListener if an GLStateKeeper instance - onPause() always destroys onDestroy() is too late, i.e. surfaceDestroyed() already called - Recognizing all GLAutoDrawable's GLAnimatorControl for pause/resume pause/resume the GLAnimatorControl of all GLAutoDrawable instances - Use GLAnimatorControl instead of Animator We used an Animator reference .. duh! Note: The EGL native WindowDriver (Android and BCM.IV) must retain their own copy of EGLGraphicsDevice, which preserves the EGLDisplay handle due to EGLDisplayUtil reference counting per nativeHandleID.
* NEWT/Android WindowDriver.closeNative0(..): Catch Exception at surface ↵Sven Gothel2013-03-221-4/+10
| | | | destroy allowing to continue destruction.
* Add GLStateKeeper handling GLEventListenerState preservation and ↵Sven Gothel2013-03-221-2/+2
| | | | | | | | | | | | | | | restauration for GLAutoDrawable - New GLStateKeeper interface, package com.jogamp.opengl Implemented by: - GLAutoDrawableBase Currently supported by: - NEWT GLWindow - GLEventListenerState package move: com.jogamp.opengl.util -> com.jogamp.opengl
* NEWT/Android: Remove KeyEvent.KEYCODE_HOME handling, since it doesn't work - ↵Sven Gothel2013-03-221-19/+0
| | | | i.e. cannot be intercepted this way.
* NEWT/Android: Fix BACK button implementation, use different KeyCode mappings ↵Sven Gothel2013-03-214-23/+145
| | | | | | | | | | | | | | | | | | | | | and allowing native action to be suppressed. - Don't trust soft-kbd visibility state, but perform invisible action. If the latter was successful - soft-kbd was visible before. - Map BACK to VK_KEYBOARD_INVISIBLE and propagate it, if soft-kbd was visible before. No native default action is performed. - Map BACK to VK_ESCAPE event and propagate it, if soft-kbd was invisible _and_ an activity was registered via registerActivity(Activity), i.e. by NewtBaseActivity. Otherwise proceed w/ default action (-> activity.finish()). - If the KeyListener consumed the [EVENT_KEY_RELEASED, VK_ESCAPE] event, it will be suppressed and no default action performed. This allows applications to have a custom 'ESCAPE' or 'BACK' handling. Otherwise (not consumed) the default action is performed.