aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
Commit message (Collapse)AuthorAgeFilesLines
...
* NEWT/OSX (Bug 836): Lifecycle operations performed on main-thread must be ↵Sven Gothel2013-10-071-13/+14
| | | | | | | | | | | | | synchronized (wait-until-done) Wait-until-done (main thread): - WindowDriver.close0(..) - WindowDriver.initWindow0(..) Otherwise a re-queued operation (i.e. CALayer attachment) will mixup the order .. Experienced w/ fullscreen exit.
* NEWT/Fullscreen (Bug 836): Exit re-parenting fullscreen w/ ↵Sven Gothel2013-10-072-22/+33
| | | | | | | | | | | | | | | [invisible-exit-visible] (-> like reparent); Always force focus; X11: Always use ALWAYSONTOP. - Remove unused 'fullscreenUseSpanningMode' state - Exit re-parenting fullscreen w/ [invisible-exit-visible] (-> like reparent) solves X11 issue, where the NEWT window doesn't 'return to it's parent'. Probably also fixes Bug 836! - Always force focus when enter and exit FS - X11: Always use ALWAYSONTOP No reason to behave different (spanning and normal-fs)
* Fix Bug 840: DefaultEDTUtil.restart() shall only reuse ThreadGroup (tg) is ↵Sven Gothel2013-09-221-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | not destroyed, otherwise use current thread's tg. With jdk7u40, when re-launching a NEWT applet (JOGLNewtApplet1Run), i.e. via browser back and forth, the following exception happens: java.lang.RuntimeException: java.lang.IllegalThreadStateException at com.jogamp.newt.awt.applet.JOGLNewtApplet1Run.init(JOGLNewtApplet1Run.java:218) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalThreadStateException at java.lang.ThreadGroup.addUnstarted(Unknown Source) at java.lang.Thread.init(Unknown Source) at java.lang.Thread.<init>(Unknown Source) at jogamp.newt.DefaultEDTUtil$NEDT.<init>(DefaultEDTUtil.java:280) at jogamp.newt.DefaultEDTUtil.restart(DefaultEDTUtil.java:91) at jogamp.newt.DisplayImpl.runOnEDTIfAvail(DisplayImpl.java:231) at jogamp.newt.WindowImpl.runOnEDTIfAvail(WindowImpl.java:1758) at jogamp.newt.WindowImpl.setUndecorated(WindowImpl.java:1477) at com.jogamp.newt.opengl.GLWindow.setUndecorated(GLWindow.java:278) at com.jogamp.newt.awt.applet.JOGLNewtApplet1Run.init(JOGLNewtApplet1Run.java:188) ... 3 more This is due to 7u40's changed ThreadGroup (tg) lifecycle, i.e. the tg is destroyed. In such case, DefaultEDTUtil.restart() shall use the current threads tg.
* Fix Bug 810: Adding Julien Gouesse's fix while moved the new ↵Sven Gothel2013-09-021-19/+13
| | | | 'addNativeJarLibsJoglCfg(..)' to GlueGen, commit c0ead6fa10280f8076704726d59f482b183fd77e
* Remedy for Bug 782: Issue Debug.initSingleton() or Debug.debug(..) before ↵Sven Gothel2013-07-174-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | calling 'PropertyAccess.isPropertyDefined(propName, default)' through Debug class. Calling 'Debug.isPropertyDefined(propName, default)' may be 'optimized' to 'PropertyAccess.isPropertyDefined(propName, default)', which would skip the modules Debug's class initialization. Iff that happens, an AccessControlException may happen, due to requesting an insecure property, since modules own Debug class has not been added it's trusted prefixes from within it's init block yet. This seems to be a bug of the JVM .. to me, however .. the above description is the only able to explain the issue at hand. +++ Fix calls Debug class own static methods, either Debug.initSingleton() or Debug.debug(), before calling 'isPropertyDefined(propName, default)'. +++ Also mark Debug class static methods final! +++
* StringBuffer -> StringBuilderSven Gothel2013-07-151-1/+1
|
* NEWT EDTUtil: Exposed weakness of EDTUtil usage due to usage of ↵Sven Gothel2013-07-0913-233/+332
| | | | | | | | | | | | | | | | | | | | | WeakReference, i.e. higher retention of Display instances. - WeakReference Change 99479bf3197cde8e89c5b499d135417863d521c7 - Refines commits: feb352145af1643a57eaae99c0342e6f5e0f2a2e dec4b02fe4b93028c85de6a56b6af79601042d6e 433e3914324b90c910b018bb7d9d80e814c67123 Reviews EDTUtil API and usage: - less confusing / more determined EDTUtil API - EDTUtil's thread shall only be reset and started when required (-> lazy) - EDTUtil's instance in Display shall be handled thread safe w/o extra blocking - EDTUtil's implementations (Default, SWT and AWT) shall be aligned / similar as much as possible Further note: SWT's EDTUtil (NewtCanvasSWT) shall not use a reused Display instance due to it's custom SWTEDTUtil. We may need to disable the ref. cache if custom EDTUtil (setEDTUtil) is intended (used).
* Fix SWTEDTUtil regression caused by ↵Sven Gothel2013-07-054-35/+56
| | | | | | | | | | | | dec4b02fe4b93028c85de6a56b6af79601042d6e, ensuring EDT is running for reused Display instances. Refine EDTUtil semantics of: - reset() - waitUntilStopped() AWTEDTUtil/SWTEDTUtil: Properly signal !running when shutdown SWTEDTUtil: Take SWT isDisposed() into account.
* NEWT Display.create: If reusing an existing instance, ensure EDT is running!Sven Gothel2013-07-051-4/+5
|
* NEWT WindowImpl: Add little GCed / windowList-size stats at addWindow2ListSven Gothel2013-07-041-1/+5
|
* DefaultEDTUtil: If EDT is not started and task is null and wait intended, ↵Sven Gothel2013-07-041-1/+4
| | | | use nullTask ensuring to wait until EDT started.
* Fix NPE - Regression of commit 99479bf3197cde8e89c5b499d135417863d521c7Sven Gothel2013-07-041-1/+3
|
* NEWT: Using WeakReferences for global cache of Display, Screen and Window ↵Sven Gothel2013-07-043-54/+68
| | | | | | | | | | | | | instances; Removing ref. at API destroy() is wrong ; Allow GC to clear .. - Removing ref. at API destroy() is wrong - Since all instances can be recreated, removing ref at destroy() is simply wrong. - Keep weak references until GC collects, i.e. user does not claim them anymore. - Safe for Display, since it holds it's EDT thread. - Window/Screen .. if user abandons reference .. nothing we can do here. - Allow GC to clear .. No need to hold ref loonger than user.
* Revisit Bug 770 and Bug 771: Only use FLAG_IS_FULLSCREEN_SPAN if required; ↵Sven Gothel2013-07-047-82/+135
| | | | | | | | | | | | | At MonitoMode change, reset fullscreen if FLAG_IS_FULLSCREEN_SPAN is supported. - Bug 770: Only use FLAG_IS_FULLSCREEN_SPAN if required - If X11 WindowDriver _and_ virtual-screen-size > fullscreenViewport, - else we still use _NET_WM_STATE_FULLSCREEN on X11! - Bug 771: At MonitoMode change, reset fullscreen if FLAG_IS_FULLSCREEN_SPAN is supported - Since we may still use _NET_WM_STATE_FULLSCREEN on X11: - Pause fullscreen at monitorModeChangeNotify(..) - Resume fullscreen at monitorModeChanged(..)
* WindowImpl.consumeKeyEvent: Reduce DEBUG println and show println after ↵Sven Gothel2013-07-032-8/+10
| | | | propagating event to show whether it has been consumed.
* 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