| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
| |
kTISPropertyUnicodeKeyLayoutData), avoiding crash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
surface DPI ; Add NEWT Window.getPixelsPerMM(..) to query surface DPI
With HiDPI and surface scale, we need knowledge of the native surface's pixel-scale
matching the monitor's pixel-per-millimeter value.
Preserving the queried native pixel-scale and exposing it via
ScalableSurface.getNativeSurfaceScale(..) to compute surface DPI.
Add NEWT Window.getPixelsPerMM(..) to query surface DPI.
Surface DPI is demonstrated in GraphUI's GPUUISceneGLListener0A .. and TestRulerNEWT01, etc ..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSX impl.
Add ScalableSurface interface
- To set pixelScale before and after realization
- To get pixelScale
- Implemented on:
- NEWT Window
- Generic impl. in WindowImpl
- OSX WindowDriver impl.
- Also propagetes pixelScale to parent JAWTWindow if offscreen (NewtCanvasAWT)
- AWT WindowDriver impl.
- JAWTWindow / OSXCalayer
- AWT GLCanvas
- AWT GLJPanel
- NEWTCanvasAWT:
- Propagates NEWT Window's pixelScale to underlying JAWTWindow
- WrappedSurface for pixelScale propagation
using offscreen drawables, i.e. GLJPanel
- Generic helper in SurfaceScaleUtils (nativewindow package)
- Fully implemented on OSX
- Capable to switch pixelScale before realization,
i.e. native-creation, as well as on-the-fly.
- Impl. uses int[2] for pixelScale to support
non-uniform scale.
Test cases:
- com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT
- com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT
- Press 'x' to toggle HiDPI
- Commandline '-pixelScale <value>'
- Added basic auto unit test (setting pre-realization)
|
|
|
|
|
|
|
|
|
|
|
| |
NEWT
To properly convert Top-Left (TL) from/to Bottom-Left (BL) coordinates
we need to utilize the given CGDisplay viewport (TL)
and NSScreen (BL) to perform the y-flip.
This is especially true for the case of having multiple monitors
covering different viewports (mixed resolution).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NEWT Support / Fix JAWT getPixelScale deadlock
- NativeWindow/Surface/NEWT API DOC: Define Coordinate System of Window and Screen
- OSXUtil: Add getPixelScale(..) via Screen index and 'windowOrView'
- JAWTWindow/JAWTUtil.getPixelScale(..): Use pre-fetched AWT GraphicsConfiguration to solve AWT-TreeLock (deadlock)
- [Virtual] Viewport of MonitorDevice and Screen:
- Properly calculate and expose [virtual] viewport in window and pixel units
- OSX Monitor viewports in pixel units are 'reconstructed'
- Window/Viewport to Monitor selection shall be perfomed via window units (unique)
- OSX NEWT Window create/init (native): Use given size and coordinates even in fullscreen mode
Don't override by quering NSScreen coordinates, trust given values.
- Fix test cases, i.e. usage of pixel- and window-units
|
|
|
|
|
|
|
| |
appropriately
Instead of using [mWin orderBack: mWin] for child windows,
utilize [mWin orderWindow: NSWindowOut relativeTo: [pWin windowNumber]]
|
|
|
|
|
|
|
|
|
|
|
| |
*Common_GetJNIEnv()/_ReleaseJNIEnv() Methods and Usage / Check arguments ..
Since we still don't use inter-module native code sharing, align the JNIEnv get/release methods and usage.
Most beneficary here is OSX and the GLDebugMessageHandle,
both managed the JVM handle on their own - removed now.
Also ensuring that *Common_init(..) is called for all modules on all platforms.
|
|
|
|
| |
missing XFree(..) calls and argument checks.
|
| |
|
|
|
|
|
|
|
|
| |
Impl. manages up-to 32 windows (BCM layer elements) - dunno whether this is a proper value.
Note: Layer 2000 is reserved for out PointerIcon.
Removed 'dead code'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Utilizing layer element 2000 for PointerIcon
- Using NEWT PointerIcon code
- Using MouseListener to update PointerIcon position
- FIXME: Check whether we shall intercept sendMouseEvent directly (lag)
Misc:
- Properly open, assign and close the BCM display handle
- Properly destroy the window (BCM element)
- Prepare for multiple windows, set position and size
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Conversion Utilities (Allowing 'arbitrary' PointerIcon data input)
Commit fe28bc125429b38cdcd016746081f4a6d521c6fd added the notion of toolkit agnostic PixelFormat and conversion utilities,
utilized and further tested by this patch.
+++
- PointerIcon is a PixelRectangle
and hence holds the decoded data.
This allows on-the-fly conversion if required
as well as recreation w/o PNG re-decoding.
- Using array-backed PointerIcon data where possible,
allowing better performance when converting PixelFormat etc.
- NEWT Display adds 'createPointerIcon(final IOUtil.ClassResources pngResource...'
method to support agnostic PointerIcon creation.
- NEWT Display adds methods to allow users to avoid PixelFormat and
Buffer NIO type forced conversion:
- PixelFormat getNativePointerIconPixelFormat()
- boolean getNativePointerIconForceDirectNIO()
+++
PNGImage -> PNGPixelRect
Deleted: com.jogamp.opengl.util.texture.spi.PNGImage
Added: com.jogamp.opengl.util.PNGPixelRect
(We hope nobody was using PNGImage directly since it was a service-plugin for TextureIO)
PNGPixelRect is a PixelRectangle
PNGPixelRect actually is implemented OpenGL agnostic,
however - since our PNGJ support lives under package 'jogamp.opengl.util.pngj'
it cannot be moved up (yet).
PNGPixelRect now handles all PixelFormat for the target format
and also added support for grayscale+alpha (2 channels).
The latter is force-converted to RGB* - similar to paletted.
Further more, PNGPixelRect allows simply passing an OutputStream to write the PNG data.
Used by: TextureIO and NEWT
+++
- OffscreenSurfaceLayer's setCursor(..) uses the agnostic PixelRectangle
instead of a PNG resource.
- AWTMisc uses the PixelRectangle to produce the AWT Cursor
and converts it to the required format.
Hence same pixels are used for NEWT and AWT pointer/cursor icon.
- TestGearsES2Newt and NewtAWTReparentingKeyAdapter 'tests'
iterate over 3 custom PointerIcon when pressed 'c'.
- JOGLNewtAppletBase uses the new custom PointerIcon
'newt/data/crosshair-lumina-trans-32x32.png', which is included in NEWT (213 bytes only).
-
|
|
|
|
|
|
|
| |
NewtCommon_throwNewRuntimeException(..) if given references are of invalid type
Missing NewtCommon_init(env) always lead to a crash when calling NewtCommon_throwNewRuntimeException(..)
due to uninitialized clazz instances!
|
|
|
|
| |
SetCursor(..) if HTCLIENT && isChildWin && customCursor
|
|
|
|
|
|
|
|
| |
(NativeWindow GDI / NEWT )
.. this allows using the icon definition of WNDCLASSEX instead of setting them at CreateWindow0(..).
- NativeWindow GDIUtil/RegisteredFactory uses WNDCLASSEX and Small/Big Defailt Icons
|
|
|
|
|
|
|
| |
Reparenting CHILD -> TOP
Hiding the window via 'ShowWindow(.., SW_HIDE)' before reparenting and subsequent
style change incl. visibility renders the Window-Icon visible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and Issues
- Refine Display.PointerIcon: Complete type allowing re-creation
- Add associated Display reference
- Add used IOUtil.ClassResources reference
- Add isValid()/validate() methods for recreation
- Refine API doc
- Move Display.destroyPointerIcon(PointerIcon) -> PointerIcon.destroy()
- Move DisplayImpl.PointerIconImpl -> PointerIconImpl (own source file)
- Creation/Destruction and setting of PointerIcon happens on EDT
- DisplayImpl.shutdownAll() and Display.destroy() calls destroyAllPointerIconFromList
- WindowDriver.setPointerIconImpl: Validates PointerIconImpl (i.e. re-creates if required)
- Fix 'initial' window.setPointerIcon(..) before createNative(..),
tested w/ TestGearsES2NEWT
- OSX Native Code:
- Move mouse and pointer-state handling from NewtMacWindow -> NewtView class
to retain states (pointer handle, pointer visibility, etc) when reparenting.
Reparenting will move an exisiting NewtView into a new NewtMacWindow.
- Enable all mouse move events:
- NewtView::mouseEnter [nsWin makeFirstResponder: nsView];
- NewtView::mouseExited if( !mouseConfined ) { [nsView resignFirstResponder]; }
- NewtView::mouseMoved issued [myCurser set] if required, fixing
OSX issue not updating NSCursor properly.
- MacWindow:
- Test NewtMacWindow, NewtView and NSCursor handles before usage
- Fix DBG_PRINT(..) warnings
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pointer Icons
- Utilizing JOGL's PNG decoder for all icons, if available.
- Application/window icons:
- Providing default application/window icons in 16x16 and 32x32 size
- NewtFactory.setWindowIcons(..) or property 'newt.window.icons' maybe used to override default icons.
- Using icons at application/window instantiation
- Display.PointerIcons:
- NativeWindow Win32 WindowClass no more references a default cursor
in favor of fine grained cursor control [in NEWT]
- Display provides create/destroy methods,
where display destruction also releases open PointerIcon references.
- Window.setPointerIcon(..) sets custom PointerIcon
- Implemented Platforms
- X11
- Windows
- OSX
- Manual Test: TestGearsES2NEWT (Press 'c')
|
|
|
|
|
|
|
|
|
|
|
|
| |
attempt)
Commit c8726ef04b94ad8e66e1191a06ff793b908d130c reinforced ALWAYS_ON_TOP in native reconfig code
issued at reparenting call, which might be too early for the WM.
Perform ALWAYS_ON_TOP reinforcement from java side when reparenting CHILD -> TOP was successful
and visibility is reached. X11 only!
NewtAWTReparentingKeyAdapter: Add 'a' alwaysOnTop toggle to test w/o applet code.
|
|
|
|
| |
comments)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Persistent when Reparenting (child -> top)
- X11 Fullscreen ALT-TAB regression (no task-switcher visible)
We still need the fast reconfigure path for ALWAYSONTOP only toggle.
It was removed w/ commit c9fcc8cd510abc0cbebb872dc3e457327655e778,
which disabled toggling FULLSCREEN and ALWAYSONTOP.
Note: Another bug in Unity WM's Compiz:
'Unredirect Fullscreen Windows := True' disables
the ALT-TAB taskbar/launcher HUD rendering and subsequent task-switch.
Hence it shall be disabled .. nothing we can do here.
- ALWAYS_ON_TOP not persistent when child -> top
WM removes ALWAYS_ON_TOP state when reparenting,
hence reinforce it when Child -> Top.
|
|
|
|
|
|
|
|
|
| |
On/Off Cycle
Unity WM keeps the _NET_WM_STATE (_NET_WM_STATE_FULLSCREEN, ..) after fullscreen-exit
even though _NET_WM_STATE_REMOVE was issued.
Add remedy: Reparent Child -> TOP: Reset _NET_WM_STATE (! _NET_WM_STATE_FULLSCREEN, ..).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clogged Key-Release Event by AWT Robot
Impact: Only unit test code
- TestNewtKeyCodesAWT:
Fix Bug 919 - Move mouse bacl/forth while waiting for events ..
- Use common wait for key timeout/polling using constants in NEWTKeyUtil
- InputEventCountAdapter:
'getQueued()' -> 'copyQueue()' - ensuring queue is copied while instance is locked.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assume having focus in fullscreen-mode
- Reset NSApp's presentationOptions @ windowClose0()
Commit 69c334448cfe8af553fd97689137ecf8f996b378 started using the [NSApp setPresentationOptions: opts]
but missed to reset to defaults @ windowClose0();
- Assume having focus in fullscreen-mode
NewtMacWindow::windowDidBecomeKey()' is not always called in fullscreen-mode!
Note: OSX Fullscreen from a browser still shows the browser title-bar
until mouse-click. Don't know how to avoid this. Minor issue..
|
|
|
|
|
|
|
| |
Switching
Remedy for 'some' display drivers, i.e. Intel HD:
Explicitly push fullscreen window to BOTTOM when inactive (ALT-TAB)
|
|
|
|
| |
at last
|
|
|
|
| |
favor of proper WM incl. ALT-TAB app-switching
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Support 'Continue Drag on Exit'
- Track dragging operation, allow exterior dragging
- Hence track EXIT (see below)
- Windows:
- Capture mouse for exterior dragging
- Only 'NewtWindows_trackPointerLeave' if 'entering'
- Simplify touch: No 'inside' check - Not required.
- Consistent Mouse ENTER/EXIT
- Track ENTER/EXIT and synthesize if required, drop duplicate
- OSX benefits, since it never produced ENTER/EXIT events
- AWT (or other TK) translated events beahve equal now.
- Required for EXIT event after ending exterior dragging and final RELEASE
Tests: Passed unit tests 'junit.run.newt.event' on
- GNU/Linux
- Windows7
- OSX 10.7
Tested exterior tracking manually w/ NEWT TestGearsES2NEWT and TestGearsES2NewtCanvasAWT:
- GNU/Linux
- Windows7 (mouse)
- Windows8.1 (touch)
- OSX 10.7
|
|
|
|
| |
not break Windows < 7 Compatibility
|
|
|
|
|
|
|
|
|
|
| |
manually in close0()
Release NewtMacWindow manually in close0()
- Mark [NewtMacWindow setReleasedWhenClosed: NO] in init0(..)
- Release NewtMacWindow manually in close0(..)
Check pointer args in close0(..)
|
|
|
|
| |
handles before usage in NewtMacWindow (Not the culprit .. but more safe)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LBUTTON[DOWN|UP] issues
- w/ TOUCH, Win8 may steal focus (KILLFOCUS), quickly grab FOCUS again when on TOUCH operation
- track 'touchDownLastUp', and don't act on LBUTTON[UP|DOWN] and MOUSEMOVE if just lifted last finger
- don't use GetMessageExtraInfo() to distinguish MOUSE/TOUCH, simply use tracked touchDownCount
- Also track mouseInside in TOUCH operation, i.e. true if _all_ fingers are inside,
otherwise don't send TOUCH event
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Native:
- WindowUserData tracks:
- window size
- mouse inside
- pointer touch-down count
and flags whether multiple-touch is supported.
- Suppress WM_*BUTTON* events if within TOUCH operations, e.g. fingers are pressed, or
if event is determined as TOUCH (0 != GetMessageExtraInfo())
- MOUSEMOVE issues NewtWindows_trackPointerLeave(..) directly
if no TOUCH operation is in process.
Removes need for MouseListener on Java side.
- TOUCH events are send as follows:
- PRIMARY first
- 1 MOVE 2nd (if not sent already)
- UP/DOWN (if not sent already)
We only send max. one MOVE event, since Win7 / Win8
assignes MOVE per default, even if no actual move happened.
Hence a single MOVE event shall suffice and is compatible
w/ e.g. Android (AFAIK).
- TOUCH pointer names are mapped to consecutive IDs
on the java side.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add reparentWindow(..) top-level position arguments; Misc
- Fixes X11 unsuccessful return to parent window
On X11 when returning to parent window (-> CHILD),
we have to set the window invisible and wait for the result.
Otherwise it sometimes happens that the WM's reparent operation fails,
i.e. the window won't become a child of desired parent and is positioned randomly.
- Add reparentWindow(..) top-level position arguments
.. allows bringing the child-window to top-level w/ a desired position.
Otherwise the window would be positioned elsewhere as a top-level
as the plain reparenting operation.
X11 needs to set position and size _after_ making the window visible,
otherwise WM may ignore the XConfigureWindow request.
- Reparent recreate shall always store the desired position and size
On OSX/CALayer when recreation is being used, we need to store the pos/size
for later creation.
- Tests: Use 'NewtAWTReparentingKeyAdapter' where possible (reparent/fullscreen)
instead of duplicating such code.
NewtAWTReparentingKeyAdapter: Performs reparenting and fullscreen operations
off-thread (i.e. not on AWT/NEW EDT) while decorating the action w/
revoking/restoring the ExclusiveContextThread (ECT).
Manually tested 'TestGearsES2NewtCanvasAWT' reparenting and fullscreen
on X11, Windows and OSX/CALayer w/ JDK 7u40 successful.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
but also for FULLSCREEN WM state.
|
|
|
|
|
|
|
|
|
| |
and CR/ENTER are printable for NEWT KeyEvent and font handling. Fix regression.
- Original behavior was treating CR/ENTER them as printable, lets keep it this way.
- KeyEvent: Query these 3 whitespaces upfront, no need to incl. them in 'nonPrintableKeys'.
- Fix regression: Native VK_ENTER was not change in commit 4c34f5980bddcdc84b10cb3bcbb96b365b9d471e.
|
|
|
|
| |
keyCode is 0.
|