aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes
Commit message (Collapse)AuthorAgeFilesLines
...
* Bug 1183: Cleanup x11/RandR javadoc and native/X11RandR13 signature commentsXerxes Rånby2015-08-101-1/+1
|
* Bug 1188, Bug 1186: NEWT Window: Support non-resizable, minimize, maximize, ↵Sven Gothel2015-08-1012-316/+1087
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | alwaysOnBottom and sticky/all-desktop (Part 1) Change also implements Bug 1186: 'NEWT Window: Use a Bitfield holding all state flags and expose it accordingly', since it is essential for an efficient implementation. Part 1: - Bug 1186 - Using Bitfield, holding public (Window) and private state bits/mask - Bug 1188 - Window adds: - [is|set]AlwaysOnBottom(..), - [is|set]Resizable(..), - [is|set]Sticky(..), - [is|set]Maximized(..), - isChildWindow(), - Full implementation for X11 - TODO: Implement for OSX and Windows - Manual tests: - TestGearsES2NEWT, TestGearsES2NEWTSimple and TestGearsES2NewtCanvasAWT utilize new NewtDemoListener, which has a key-listener to perform all [new] actions. See source code of NewtDemoListener.
* Bug 1183: Handle NULL return values for native RandR13 calls, which suppose ↵Sven Gothel2015-08-052-6/+13
| | | | | | | | | | | | | | to return 'int[]' Certain native RandR13 functions shall return 'int[]', but will bail out early in case of an error or lack of resources. The latter is true for getMonitorDeviceIds(..) where 'XRRScreenResources->ncrtc <= 0', causing return value NULL. This patch handles the NULL return values, however, the root cause of having 'XRRScreenResources->ncrtc <= 0' _occasionally_ lies within the Raspi X11 driver I am afraid?!
* Fix commit 24b646d387b3d85467bb22763b016a556d665707: Add missing semicolonSven Gothel2015-08-021-1/+1
|
* NEWT.WindowImpl: Adopt synchronized Bitfield for state flags (replacing 11 ↵Sven Gothel2015-08-024-100/+111
| | | | booleans)
* Adapt to GlueGen's Bitfield Changes (commit ↵Sven Gothel2015-08-022-4/+4
| | | | 047e9adaf2a5f51f7acfa194a744c99b6bfadaea)
* Use GlueGen's Bitfield instead of IntBitfieldSven Gothel2015-07-304-15/+15
|
* Merge branch 'Bug1178' of https://github.com/xranby/joglSven Gothel2015-07-297-15/+506
|\
| * Bug 1178: Workaround cc9 X11UnderlayTracker: Pressing Maximize locks-up the ↵Xerxes Rånby2015-07-291-1/+3
| | | | | | | | | | | | | | | | | | NEWT EDT cc9: Pressing Maximize locks-up the NEWT EDT Workaround cc9: Prevent the overlay to reposition the underlay. Signed-off-by: Xerxes Rånby <[email protected]>
| * Bug 1178: if overlay is undecorated then make under-lay the sameXerxes Rånby2015-07-282-9/+12
| |
| * Bug 1178: Mouse events shall be passed on to unfocused overlays.Xerxes Rånby2015-07-281-66/+62
| |
| * Bug 1178: Fix cc7 X11UnderlayTracker can now track multiple windows.Xerxes Rånby2015-07-281-86/+115
| | | | | | | | | | | | | | cc7: the UnderlayTracker needs to be engineered to handle multiple overlays -> need to spawn one X11 window for each new overlay. Signed-off-by: Xerxes Rånby <[email protected]>
| * Bug 1178: Fix cc8 bcm.vc.iv WindowDriver: Update pointer during DRAGGED events.Xerxes Rånby2015-07-281-1/+1
| | | | | | | | | | | | | | | | 1178 cc8: The bcm.vc.iv mousepointer is not updating _visible_ position during DRAGGED events. Fix cc8: update bcm.vc.iv WindowDriver doMouseEvent Signed-off-by: Xerxes Rånby <[email protected]>
| * Bug 1178: X11UnderlayTracker Fix cc4. Attempted fix for cc6.Xerxes Rånby2015-07-281-221/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename window -> underlayWindow. Fix indentation, long lines & whitespace. Bug 1178 cc4: another window overlaps NEWT underlay window -> overlay window is still on top. Fix 1178 cc4: we can request the NEWT underlay window to use always on top. Bug 1178 cc6: if you render the overlay window transparent -> caps.setBackgroundOpaque(false); then you will see that the underlay tracker window newer repaints -> looks a bit like a mess. Attempted fix 1178 cc6: x11 underlay tracker window can be set transparent as well. FIXME: The underlay tracker window is still filled with opaque garbage. Signed-off-by: Xerxes Rånby <[email protected]>
| * Bug 1178: Fix cc0 WindowImpl: Swallow CLICK eventXerxes Rånby2015-07-281-2/+3
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * Bug 1178: Implement X11UnderlayTrackerXerxes Rånby2015-07-286-12/+446
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver/x11/X11UnderlayTracker Using NEWT to initialize an X11 window for use by Raspberry Pi users to handle mouse and keyboard input when using the bcm.vc.iv driver inside xorg. newt/driver/bcm/vc/iv/WindowDriver Try use X11UnderlayTracker as input for bcm.vc.iv If X11 fail to initialize then track using the /dev/event files directly using the LinuxMouseTracker. Input source is switched inside bcm/vc/iv/WindowDriver by using the new newt/driver/KeyTracker newt/driver/MouseTracker interfaces. Signed-off-by: Xerxes Rånby <[email protected]>
* | Bug 1154 - Make plugin3-public.jar optional: Part 1 / 2 (Relocate Applet3 ↵Sven Gothel2015-07-282-2/+3
| | | | | | | | classes)
* | Bug 1181 - JOGL WebStart Applications using GLCanvas/AWT may Deadlock by two ↵Sven Gothel2015-07-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AWT-EDT on Java >= 1.8.0_45 Root cause: - AWT Toolkit global Lock Our locking scheme (AWT-EDT-1): - Surface Lock - sun.awt.SunToolkit.awtLock() - Component.getGraphicsConfiguration() -> synchronized(Component.getTreeLock()) Other AWT-EDT-2 by Webstart: - synchronized(Component.getTreeLock()) - sun.awt.SunToolkit.awtLock() Results in a deadlock. Solution: - Issue Component.getGraphicsConfiguration() before awtLock(), where Component.getGraphicsConfiguration() is being used to detect possible reconfiguration. - Also use updated AWTGraphicsConfiguration's GraphicsConfiguration if no 'new' detection is required.
* | Bug 1184 - JOGL AWT Canvas Components don't update AWTGraphicsConfiguration ↵Sven Gothel2015-07-272-12/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when reconfigured. JOGL AWT Components, e.g. GLCanvas or NewtCanvasAWT, may be reconfigured by moving them to another display/monitor or by other means. Since AWT has no means to notify the user code via an event, JOGL components usually determine the reconfiguration via the override 'GraphicsConfiguration getGraphicsConfiguration()'. GLCanvas is sensible to this reconfiguration, however its AWTGraphicsConfiguration (owned via JAWTWindow) is not changed. Implement reconfiguration detection for all JOGL AWT Components and update the AWTGraphicsConfiguration if required. For now, constraint reconfiguration on GraphicsDevice change as currently implemented in GLCanvas. The updated AWTGraphicsConfiguration allows using the updated GraphicsDevice as it might be required for further information, e.g. pixel-scale on OSX.
* | Bug 1151 - Fix using DK1 on OVR 0.5*; Minor changesSven Gothel2015-07-201-0/+2
|/
* bcm/vc/iv/DisplayDriver depend on libEGL, pre-load it using GLProfileXerxes Rånby2015-07-171-0/+2
| | | | | | | Fixes libnewt.so: undefined symbol: bcm_host_init" when the NEWT Screen is initialized before OpenGL ES. Signed-off-by: Xerxes Rånby <[email protected]>
* Bug 1176: BCM VC IV: Refine clamping of window position and size at native ↵Sven Gothel2015-07-171-13/+29
| | | | | | | | | | | | | | | creation - Refines commit a566a1b5a2828b38f1a5c4dfb215ab9b03e7acaa - Issue clamping at 'canCreateNativeImpl()' instead of 'createNativeImpl()', allowing to define clamped position and size before utilizing these values at caller 'createNative()'. Otherwise a clamped position would cause to wait for the original position after 'createNativeImpl()'. This also allows to remove the positionChanged(..) / sizeChanged(..) calls in the native CreateWindow0() implementation.
* Bug 1176: BCM VC IV: Add window-position to window-relative mouse position ↵Sven Gothel2015-07-171-1/+1
| | | | in DisplayDriver.moveActivePointerIcon(..) call
* Bug 1176: Clamp window position and size to 0/0 and screen-size, avoiding ↵Sven Gothel2015-07-171-3/+60
| | | | | | | | | | | | | out-of screen window positions on BCM VC IV hardware Out of screen window positions on BCM VC IV hardware cause: - Misalignment of self-rendered mouse-pointer / window due to window-offset. - Artifacts when moving the mouse pointer partially out of screen. We still need to add the window position to rel. mouse-pointer position.
* Bug 1153 - Adopt to ArrayHashSet change, don't use deprecated ctor (gluegen ↵Sven Gothel2015-04-015-11/+13
| | | | commit c156343fec33ceea7f238b9766a9f4985fb92687)
* StereoDeviceUtil: Only rotate if current mode doesn't match required ↵Sven Gothel2015-03-271-2/+9
| | | | | | rotation. Add verbosity. Allowing user to permanently rotate the device ..
* Bug 1148 - OSX MonitorDevice: Use unique and native deviceID instead of indexSven Gothel2015-03-213-25/+53
| | | | | | | | | | | | | Adopt to bug 1147, commit 2c88b6dfd4eb7e2cd9a50fa48e08ecafc980931a. Using the native unique deviceID makes monitor identification more robust. This also allows us simplify displayID -> NSScreen-idx -> MonitorDevice into displayID -> MonitorDevice and to survive a primary monitor change.
* Bug 1116 - Add OculusVR DK2 Support - Part-1 (DK2 on DK1 SDK w/o Eye Tracker)Sven Gothel2015-03-211-0/+91
| | | | | | | | | | | | | | | | | - DK2's screen on X11 (at least) starts in rotated mode, detect and apply MonitorDevice rotation via NEWT's OpenGL StereoDeviceUtil - Move StereoDevice.Config -> StereoDeviceConfig - Expose generic StereoDevice to public: GenericStereoDeviceConfig + GenericStereoDeviceFactory - GenericStereoDeviceFactory exposes public GenericStereoDeviceConfig creation for mono, sbs-stereo and lense-sbs-stereo w/ diff. parameters. - Pass eye surface/texture size for each eye from device to renderer, instead of assuming unified values. - Unify GenericStereoDevice.createRenderer(..) and OVRStereoDevice.createRenderer(..) code
* Bug 1147 - Fix XRandR13 Usage: Rotate / Change-Mode, use unique CRTC/Mode ↵Sven Gothel2015-03-209-96/+175
| | | | | | | | | | | | | | | | | | | | | ids, .. RandR 1.3 XRRSetCrtcConfig related: - X11RandR13 now sets the new screen size via XRRSetScreenSize(..) - X11RandR13 now propagates RRScreenChangeNotify events via XRRUpdateConfiguration(event). Hence reporting virtual desktop size now. - X11RandR13 now disables the CRTC before XRRSetCrtcConfig(..) to avoid invalid configuration (see spec)! RandR 1.3 General: - Uses unique id named instead of unstable index for modes and CRTC. This allows proper identification even for 'swizzled' devices.
* MonitorDevice.toString: More brief 'options' ..Sven Gothel2015-03-091-1/+1
|
* Bug 1142 - NEWT: Add support to retrieve the primary MonitorDeviceSven Gothel2015-03-0915-29/+125
| | | | | | | | | | | | | | | | | Support added for - Windows - X11 XRandR 1.3 - OSX Note: Our whole MonitorMode association handling is currently _not_ dynamic. - only on Windows we actually use native unique ID, which might not change (adapter and monitor idx) - On OSX and X11 we simply use indices, but if monitor setup changes - they refer to different instances. In case it is desired to cover dynamic monitor setup change, we need to address this issue in a new bug entry.
* Fix regression of commit 559ecad2a2387ba0aa34ce9e35ca8a2c5a31e655: ↵Sven Gothel2015-03-091-0/+1
| | | | IDX_MONITOR_DEVICE_VIEWPORT needed to be updated!
* Bug 1130 - Add Mapping from AWT Component -> NEWT [Screen, MonitorDevice]Sven Gothel2015-02-172-0/+122
| | | | | | | | | | | | | | | | | | | | | | | The mapping AWT Component -> NEWT [Screen, MonitorDevice] shall allow generic AWT applications to utilize NEWT's MonitorDevice information like physical monitor-size and DPI. - AWT-Component -> NEWT-Display: - NewtFactoryAWT.createDisplay - AWT-Component -> NEWT-Screen: - NewtFactoryAWT.createScreen - AWT-Component -> NEWT-MonitorMode: - NewtFactoryAWT.getMonitorDevice - NewtFactoryAWT.getMonitorDevice - If OSX, utilizing OSX's AWT Component -> MonitorDevice-Index mapping - Otherwise using the coverage to identify MonitorDevice See TestGearsES2GLJPanelAWT 'GetPixelScale', demonstrating the mapping while pressing 'p' (cached MonitorMode) and pressing SHIFT-'p' (non-cached MonitorMode).
* MonitorDevice: Add 'throws IllegalStateException' for ↵Sven Gothel2015-02-172-8/+13
| | | | [query|set]CurrentMode(..) if !screen.isNativeValid()
* Fix commit 559ecad2a2387ba0aa34ce9e35ca8a2c5a31e655 ↵Sven Gothel2015-02-171-1/+0
| | | | | | | (ArrayHashSet<MonitorDevice> instance erroneously added) Revert useless ArrayHashSet<MonitorDevice> instance erroneously added in commit 559ecad2a2387ba0aa34ce9e35ca8a2c5a31e655.
* NEWT MonitorDevice: Identify cloned devices (fully covered) ; Windows: ↵Sven Gothel2015-02-1715-46/+121
| | | | | | | | | | | | | | | | | | | Iterate-over and identify all adapter:monitor. (Bug 1129) - Identify cloned devices (fully covered) - MonitorDevice gets 'isCloned()' to identify whether it is a cloned device, i.e. fully covered by another monitor. This detection may happen natively but will always performed platform agnostic. - getMainMonitor(..) now exclude 'cloned' devices - Windows: Iterate-over and identify all adapter:monitor - Since we also list cloned monitor, we need to iterate over all adapter and all it's monitor-devices. - The native monitor-id is now defined as: ( adapter-idx << 8 ) | monitor-idx. - Bug 1129 <- listed under this bug entry for convenience
* Bug 1129 - NEWT MonitorDevice's physical size on Windows must be read via EDIDSven Gothel2015-02-162-39/+48
| | | | | | | | | | | | | | | | | | | On Windows, one must read the monitor's EDID data as stored in the registry, no 'simple' API works otherwise. The proper way requires utilizing the Windows Setup-API. This code is inspired by Ofek Shilon's code and blog post: <http://ofekshilon.com/2014/06/19/reading-specific-monitor-dimensions/> See: function 'NewtEDID_GetMonitorSizeFromEDIDByModelName' In contrast to Ofek's code, function 'NewtEDID_GetMonitorSizeFromEDIDByDevice' uses the proper link from DISPLAY_DEVICE.DeviceID -> SP_DEVICE_INTERFACE_DETAIL_DATA.DevicePath, where DISPLAY_DEVICE.DeviceID is the monitor's enumeration via: EnumDisplayDevices(adapterName, monitor_idx, &ddMon, EDD_GET_DEVICE_INTERFACE_NAME); Hence the path to the registry-entry is well determined instead of just comparing the monitor's model name.
* Bug 682 - Relocating javax.media.opengl.* -> com.jogamp.opengl.* (Part 1)Sven Gothel2015-02-0271-333/+333
| | | | | | | | | sed -i 's/javax\.media\.opengl/com\.jogamp\.opengl/g' `grep -Rl "javax\.media\.opengl" src` sed -i 's/javax\.media\.nativewindow/com\.jogamp\.nativewindow/g' `grep -Rl "javax\.media\.nativewindow" src` sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" src` sed -i 's/javax\/media\//com\/jogamp\//g' `grep -Rl "javax/media/" doc` Manually edited all occurences within make/**
* Bug 1120 - Refine HiDPI Support ( Part-2 ) (API CHANGE)Sven Gothel2015-01-2720-139/+283
| | | | | | | | | | | | | | | | | | | | | | - Use float[2] for pixel-scale. Utilize simple integer rounding: int-pixel-units = (int) ( int-window-units * pixel-scale + 0.5f ) - Provide minimum and maximum allowed pixel-scale values to be set by platform, supporting generic pixel-scale validation. - Remove 'OSXUtil.GetPixelScale(final RectangleImmutable r, final int[] screenIndexOut)', implementation for all platforms would cause huge redundancy of Screen and MonitorDevice code (duplication of NEWT). - instead, add 'float[2] pixelScale' to NEWT's MonitorDevice - Detect change of pixel-scale and propagate accordingly. This allows GLCanvas, GLJPanel and NewtCanvasAWT instances to be dragged between monitor devices w/ different pixel-scale. - OSX: Handle native triggered reshape events off-thread to avoid EDT congestion due to locked window when consuming deferred events on EDT.
* Bug 1100: Fix href to 'lifecycleHeavy' -> '#lifecycleHeavy' (anchor)Sven Gothel2015-01-231-8/+8
|
* Merge remote-tracking branch 'remotes/github-mark/master'Sven Gothel2015-01-231-0/+17
|\
| * Fix typoMark Raynsford2014-10-281-1/+1
| |
| * Bug 1100 - Document lifecycle-heavy concept and mark some of the relevant ↵Mark Raynsford2014-10-281-0/+17
| | | | | | | | methods.
* | Bug 1096 - Expose EGL to public: com.jogamp.opengl.egl.EGL ; ↵Sven Gothel2015-01-235-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | EGLDrawableFactory: Validate static EGL func-ptr, probe EGL/ES2 first - Move EGL to public package jogamp.opengl.egl.EGL -> com.jogamp.opengl.egl.EGL - EGLDrawableFactory - Validate static EGL func-ptr against EGL/ES2, ignoring EGL/[ES|GL] collisions w/ diff. native EGL implementations due to static EGL usage. - Probe EGL/ES2 first
* | Bug 1068, 1096: Unify EGL surface related code in EGLSurface; Add notion of ↵Sven Gothel2014-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'Surfaceless Upstream Surface' Preparation for Bug 1068: GLContext creation and makeCurrent without default framebuffer - Unify EGL surface related code in EGLSurface - EGLWrappedSurface -> EGLSurface, which utilizes a more straight forward foreign upstream surface (X11, GDI, ..) to EGL mapping. This also addresses Bug 1096, i.e. EGL Cleanup. - Add notion of 'Surfaceless Upstream Surface' - Add surfaceless 'fake' upstream surface hooks: - EGLUpstreamSurfacelessHook - X11UpstreamSurfacelessHook Utilizing the ProxySurface option bit 'OPT_UPSTREAM_SURFACELESS' signaling usage of 'no surface'. - Add GLDrawableFactoryImpl.createSurfacelessImpl(..)
* | Bug 1107 - Refine PixelFormat, GLPixelBuffer and ↵Sven Gothel2014-12-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DirectDataBufferInt/BufferedImageInt - PixelFormat Refine definition allowing complete format conversion by its attributes instead of static 'knowledge'. - PixelFormat has_a *new* PixelFormat.Composition - PixelFormat.Composition contains all pixel component layout information as required for inspection and conversion. Component names are enumerated via PixelFormat.CType. - PixelFormatUtil.convert(..) utilizes generic conversion based on PixelFormat.Composition rather static type mapping. However, a int32 RGBA static conversion is still supported for performance. Utilizes Bitstream for varying pixel component bit-width. - Complete w/ hashCode() and equals(..) - GLPixelBuffer - Take 'pack' mode into account when determine GLPixelAttributes, i.e. on GLES pack=true (e.g. glReadPixel) only RGBA is guaranteed to work. Hence querying GLPixelAttributes requires the GLProfile, PixelFormat and pack mode. - Complete GLPixelAttributes conversions from PixelFormat or GL format/data-type, while taking GL data-type into account, as well as pack-mode. - Complete w/ hashCode() and equals(..) - SingletonGLPixelBufferProvider queries singleton GLPixelBuffer via - PixelFormat.Composition hostPixelComp, - GLPixelAttributes pixelAttributes, - boolean pack which comprise a unique key, allowing the implementation to utilize a hash map. This is implemented in AWTSingletonGLPixelBufferProvider. This allows distinct singleton GLPixelBuffer for different host PixelFormat (conversion) and GLPixelAttributes (depending on GLProfile). - Removes field 'componentCount' which was 'hacked in' to pass information about an optional host memory layout. Implementations utilizing conversion, e.g. AWTGLPixelBuffer, can implement GLPixelBufferProvider's 'PixelFormat.Composition getHostPixelComp(final GLProfile glp, final int componentCount)' and manage such implementation details, see use-case GLJPanel. - DirectDataBufferInt/BufferedImageInt: Expose underlying NIO ByteBuffer - AWTMisc.createCursor(..) uses DirectDataBufferInt.BufferedImageInt exposed NIO ByteBuffer, allowing to use generic PixelFormatUtil.convert(..).
* | Use ExceptionUtils.dumpStack(..) instead of Thread.dumpStack()Sven Gothel2014-10-268-31/+39
|/
* Bug 1093 - NEWT PointerIcon swizzled on X11 and OSX; WindowIcon swizzled on ↵Sven Gothel2014-10-103-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSX ([R] -> [B]) Following mistakes were made in native PixelFormat for PointerIcon and WindowIcon: PointerIcon: X11: RGBA8888 -> BGRA8888 OSX: BGRA8888 -> RGBA8888 WindowIcon: OSX: BGRA8888 -> RGBA8888 Test case: TestWindowAndPointerIconNEWT (requires visual validation) +++ Summary: PointerIcon: BGRA8888: X11, Win32 RGBA8888: OSX WindowIcon: BGRA8888: X11, Win32 RGBA8888: OSX +++ Reported by 'LT' <http://forum.jogamp.org/Mac-OSX-newt-pointer-and-window-icon-displays-incorrectly-tp4033294.html>
* Newt Screen viewport in windows units: Add missing setup in overriden ↵Sven Gothel2014-10-096-0/+6
| | | | calcVirtualScreenOriginAndSize(..) method (duplicate pixel unit)
* NEWT Display: Fix typo in API docSven Gothel2014-10-071-1/+1
|