| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MacOS (fixes NewtCanvasSWT on SWT positioning)
Newt's OSX Window consist out of NSView wrapped up within its own NSWindow.
It's position is being set via its NSWindow's client-area position on screen (frame),
which we derive from NSView's client-area position.
When NEWT reparents into a new 'window',
on OSX it uses the parent's NSView and its NSWindow
to attach its own NSView and NSWindow as a subview and childwindow.
SWT's OSX implementation uses NSView's for each Compositor,
but an individual NSWindow is only established for the Shell (Window).
An oversight in Nativewindow and NEWT's coordinate translation:
'top-left view <-> top-left screen'
by missing the 'view <-> window' translation caused this whole issue.
The oversight occured as NEWT's 'view <-> window' translation
had no impact due to its 1-view to 1-window mapping.
Fixing the coordinate translation resolves the mess
for SWT and for potential other toolkits on OSX.
NewtCanvasSWT behaves same on OSX as on X11 etc finally.
|
| |
|
|
|
|
|
|
| |
This also demonstrates that on non MacOS, SWT's scale-factor is artificially imposed
on the actual pixel-units, as SWT's getClientArea() is simply returning:
DPIUtil.autoScaleDown(getClientAreaInPixels())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getClientArea() on MacOS produces a 'difficult' result regarding the position,
which usually is returned as zero.
Using a zero position issues the bug w/ SashForm, where the offset doesn't seems
to be covered by the native NSView nor an SWT parent Composition.
Then using the getLocation() as is (i.e. the view's frame position)
may also cause issues with the TabFolder, as it includes the tab's trimming.
Here the native NSView 's position includes the tab's trimming,
gladly the parent (TabFolder or a Composition)'s clientArea includes this offset.
Therefor, as a testbed - on OSX, getClientArea2(..) returns
- position: getLocation() - getParent().getClientArea().position
- size: getSize()
This at least works OK'sh using
- no special layout parent
- TabFolder
- SashForm
++++
Unit test TestGLCanvasSWTNewtCanvasSWTPosInTabs: Adding 'addComposite' to test matrix.
'addComposite' wraps our GLCanvas or NewtCanvasSWT into a Composite instead of
adding it directly into the layouting parent.
It demonstrates an issue with the new test 'test32_NewtCanvasSWTTabSashGLWComp',
i.e. the NewtCanvasSWT is shown on the left as the SashForm's offset is being dropped.
Summary:
- No more issues with High-DPI pixelScale observed!
- GLCanvas is being most well layouted, no issues in tests
- NewtCanvasSWT may show severe positioning issues -> test32_NewtCanvasSWTTabSashGLWComp
- NewtCanvasSWT always shows a small positioning offset into the lower-right corner w/ overlapping
- NewtCanvasSWT overall positioning is not perfectly understood
- NewtCanvasSWT misses to hide the NEWT child when changing tabs in TabFolder
|
| |
|
| |
|
|
|
|
| |
'setNEWTChild(..)'
|
|
|
|
| |
setBounds(..)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even w/ commit fb211581fefc994d1458a2a74801dfb937170f39, propagating the SWT pixelScale to NEWT-Child,
hasPixelScale was never updated via updatePixelScale() through native callback [NSView viewDidChangeBackingProperties]!
[NSView viewDidChangeBackingProperties] not being called on [created] child windows (NewtCanvasSWT)
confused the overal pixelScale state, i.e. no hasPixelScale update via updatePixelScale(..).
This change explicitly queries OSXUtil.GetWindowPixelScale(handle) (commit e6d53e29f05a6928192f6c4a988b2aa558be8d65)for:
1) updateMaxScreenPixelScaleByWindowHandle(..), which now updates the actual hasPixelScale after native creation
and for
2) setSurfaceScale(..), which directly calls updatePixelScale(..) with the queried actual pixelScale
instead of relying on the native callback [NSView viewDidChangeBackingProperties].
|
|
|
|
|
|
|
|
|
| |
utilize it for convertTo*Units(..)
Detected pixelScale on SWT should be propagated to the NEWT Child
using 'newtChild.setSurfaceScale(pixelScale)' to allow an impact.
Also utilize computed pixel for converTo*Units(..) implementation.
|
|
|
|
|
|
|
|
| |
pixel-units
Commit ca7f0fb61b0a608b6e684a5bbde71f6ecb6e3fe0
did one thing wrong: Using the pixel-unit size for
NEWT child window operations where window-units are required.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specialization
On MacOS, commit 12eed5d38616d23b6e8e2e5b497dfc2f54d90c90 replaced all
parent.getLocationOnScreen(..) calls with OSXUtil.GetLocationOnScreen(parentHandle, ..)
avoiding the EDT + Appkit Deadlock with native parenting.
On MacOS AWT and JAWT are using offscreen CALayer since Java >= 1.7.0,
therefor the MacOSXJAWTWindow's native window handle can't be used to gather
the screen position via OSXUtil.
However, the JAWT Window specialization MacOSXJAWTWindow implements a non-locking code-path
and we can decide to use it by querying the general interface OffscreenLayerOption.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
library
DRM/GBM is enabled for Linux in general.
Nativewindow's 'nativewindow_drm' DRM/GBM native library is already seperated.
NEWT get its 'newt_drm' DRM/GBM native library.
NEWT's main head native library is renamed from 'newt' -> 'newt_head'
and is earmarked for further seperation similar to Nativewindow's.
At least a 'newt_wayland' will probably followup when support is added.
Goal is to remove DRM/GBM dependency for Linux X11 operation
as well as removing X11 dependency for Linux DRM/GBM operation.
|
|
|
|
| |
CapabilitiesImmutable not being GLCapabilitiesImmutable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and not repositionable.
Our two fixed size and position console cases 'bcm.egl' and 'egl.gbm' (drm.gbm)
only operate in a console like fullscreen mode.
We should earmark and expose this behavior, as well as handle it by not waiting for a position / size
and not attempting to change position and size.
Reducing WindowImpl.minimumReconfigStateMask to bare minimum values:
STATE_MASK_VISIBLE | STATE_MASK_FOCUSED;
New WindowImpl.mutableSizePosReconfigStateMask extends WindowImpl.minimumReconfigStateMask, representing previous values:
STATE_MASK_VISIBLE | STATE_MASK_FOCUSED | STATE_MASK_FULLSCREEN | STATE_MASK_RESIZABLE | STATE_MASK_REPOSITIONABLE;
All WindowDriver implementations previously using WindowImpl.minimumReconfigStateMask
are now using WindowImpl.mutableSizePosReconfigStateMask but the explicit console driver named above.
I would have liked to add the STATE_BIT_FULLSCREEN to the current stateMask to notify this semantics,
however this would have lead to more code changes as our fullscreen mode assumes to be 'on top' of the normal mode.
Here the normal mode is essentially fullscreen and no back/forth fullscreen setting is useful or allowed.
Therefore, both fixed size & position console driver won't expose themselves as being in fullscreen mode.
|
|
|
|
| |
AppKit/EDT deadlock for parent screen location lookup
|
|
|
|
| |
screen position directly w/o locking.
|
| |
|
|
|
|
|
|
| |
earmark spanning across monitors
drmModeSetCrtc(..)'s x/y parameter are the surface's offset to be scanned out from one CRT!
|
|
|
|
|
|
|
|
|
|
|
| |
closing)
Commit d5ba4cae824087879a4857e20961a95da04eaebb clarified and simplified the lifecycle of a PointerImpl instance, i.e. drop its resurrection in
PointerImpl.validateHandle() in favor of a hard exception.
This caused detection of subsequent PointerImpl lifecycle issues,
as instances were not fully destroyed on Display closing and
references not null'ed in Display and Screen instances.
|
|
|
|
| |
This bug never allowed a PointerIconImpl to be destroyed via PointerIconImpl.destroy()
|
|
|
|
|
|
|
|
|
| |
stdin in vsync-wait-loop
User input during test from the console will also end up in stdin of the console after the java application has been closed.
This is not only annoying, but also a security concern, as the input gets executed if containing a CR.
Further, the vsync-wait-loop shall ignore stdin.
|
|
|
|
| |
Move native handle check to pre-destruction call in PointerIconImpl.destroyOnEDT(..), unifying single destruction and all.
|
| |
|
| |
|
|
|
|
| |
hence pass PointerIconImpl through
|
|
|
|
|
|
|
| |
eglSwapBuffers(..) just in case ..
This is the poor man's SYNC: glFenceSync () with glWaitSync().
However, this change did not resolve Bug 1408. Earmarked to be removed!
|
|
|
|
| |
disables PointerIcon usage in general.
|
|
|
|
| |
decoration for PointerIcon operations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PointerIconImpl.validatedHandle() shall not create native resource.
Semantic cleanup for clarity and equal behavior
Align DisplayImpl.createPointerIcon(..) behavior
- return null handle of createPointerIconImplChecked(..) shall be accepted,
no exception for neither of the two creation methods.
PointerIconImpl.validatedHandle() shall not create native resource.
- throws exception if handle is null (about to be used)
- no native creation shall happen here.
Display.PointerIcon.validate(): Removed, not used.
|
|
|
|
| |
swapInterval to optionally skip VSYNC if 0
|
|
|
|
| |
must be enabled via -pointerIcon
|
|
|
|
|
|
|
|
| |
commit 453f80e38bcb0945e7eac27a5917dce9bdc6446b added disabling the tracker,
however the NEWT usage didn't cover all mouse tracker null pointer.
Further, let's initialize and spawn off the threads only at first getSingleton() call
not at class initialization earlier.
|
|
|
|
|
|
|
|
|
|
|
| |
disable each
LinuxKeyEventTracker also disable the eventX reading by default, but can be enabled via new property.
The 'return bug' (crash due to underlying console) is indeed not occuring
when using a VT w/o running console application underneath.
As Xerxes showed, one may use chvt to a free known VT or openvt.
|
|
|
|
| |
more documentation
|
|
|
|
|
|
|
|
|
|
|
|
| |
DRM allows 64x64 pixel cursor images, using GBM_FORMAT_ARGB888 only.
Notable: GBM_FORMAT_ARGB888 == PixelFormat.BGRA8888
Having fixed mouse and keyboard input with previous commit,
the demo com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT
shows via key press
- i -> pointer visible/invisible
- c -> pointer icon change
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
keyboard event files
The time structure on 64bit machines uses two 8 byte long values instead of two 4 bytes int values on 32bit machines.
The insufficient read on 64bit machines caused an IllegalArgument exception.
This fix considers 32 or 64 bit operation.
Class renamed: LinuxEventDeviceTracker -> LinuxKeyEventTracker, as it tracks key events specifically.
Now the EventDeviceManager tries to only use /dev/input/by-id/*-event-kbd keyboard event files,
which reduces the handling on kbd event files only.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding new classes DRMLib (gluegen of drm + gbm), DRMUtil and DRMMode GBMDummyUpstreamSurfaceHook
to new package jogamp.nativewindow.drm, allowing full awareness of DRM + GBM within NativeWindow for JOGL + NEWT.
DRMMode replaces the previous native code of collecting drmMode* attributes: active connector, used mode, encoder etc
and also supports multiple active connectors.
DRMUtil handles the global static drmFd (file descriptor), currently only the GNU/Linux DRM device is supported.
GBMDummyUpstreamSurfaceHook provides a simple dummy GBM surface.
NativeWindow provides the new nativewindow_drm.so and nativewindow-os-drm.jar,
which are included in most 'all' jar packages.
build property: setup.addNativeEGLGBM -> setup.addNativeDRMGBM
Changes NativeWindowFactory:
- TYPE_EGL_GBM -> TYPE_DRM_GBM while keeping the package ID of '.egl.gbm' for NEWT (using EGL)
- Initializing DRMUtil at initialization
Changes EGLDrawableFactory:
- Using native GBM device for the default EGL display creation instead of EGL_DEFAULT_DISPLAY.
This resolves issues as seen in Bug 1402, as well in cases w/o surfaceless support.
- GL profile mapping uses surfaceless when available for GBM,
otherwise uses createDummySurfaceImpl (dummy GBM surface via GBMDummyUpstreamSurfaceHook)
- createDummySurfaceImpl uses a dummy GBM surface via GBMDummyUpstreamSurfaceHook
- DesktopGL not available with GBM, see Bug 1401
NEWT's DRM + GBM + EGL Driver
- Using DRMLib, DRMUtil and DRMMode, removed most native code but WindowDriver swapBuffer
- ScreenDriver uses DRMMode, however currently only first connected CRT.
- WindowDriver aligns position and size to screen, positions other than 0/0 causes DRM failure
- WindowDriver reconfigure n/a
NEWT TODO:
- DRM Cursor support (mouse pointer)
- Pointer event handling
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- EGLSurface: Factor out 'eglCreate[Platform]WindowSurface'
NEWT egl.gbm.WindowDriver
-- Properly use GBM fourcc format and use as visualID
for GBM surface creation and EGL config selection
-- Create eglSurface within this class
-- Hook up GBM/DRM page flip (not working yet, no visible artifacts - no swap)
- ProxySurfaceImpl.surfaceSwap() call upstreamSurface's implementation if available
TODO: 'Permission denied' calling:
- drmSetMaster (optional)
- drmModeSetCrtc
- drmModePageFlip
|
| |
|
|
|
|
|
| |
getCustomClass(..) shall throw all required exceptions upstream.
Previous essential NEWT driver exception information got suppressed if failing, only disclosed in debug mode.
|
|
|
|
|
|
| |
GBM driver is now under egl/gbm subpackage and has been replaced by bcm_vc_iv boilerplate.
Native code is reentrant capable and cleaned up.
TODO: EGLDisplayUtil work with SharedResourceRunner
|
| |
|
| |
|
| |
|
|
|
|
| |
Also issue the orderFront0 call within createWindow1 (aligned with IOS code)
|
|
|
|
|
|
| |
Introducing boolean property 'newt.macos.useAppKitEDTUtil', which defaults to 'false'.
If enabled, the new AppKitEDTUtil is being used, operating on the AppKit main thread.
This is used to ease debugging Bug 1393, minimizing thread context switches.
|
|
|
|
| |
insetsChanged + insetsVisibleChanged
|
|
|
|
| |
argument. Method only changes state.
|
|
|
|
|
|
| |
Additionally, setPointerIcon0 must also be made async on AppKit (instead of wait),
we have to assume/hope the user won't pull the PointerIconImpl instance in-between ;-)
Hence removing the comment regarding the lifecycle.
|