summaryrefslogtreecommitdiffstats
path: root/src/newt
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1202 - Add support of Adaptive Vsync via [GLX|WGL]_EXT_swap_control_tearSven Gothel2015-08-273-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [GLX|WGL]_EXT_swap_control_tear extensions support asynchronous buffer swaps, i.e. adaptive Vsync. <https://www.opengl.org/wiki/SwapInterval_aka_vsync#Adaptive_Vsync> <https://www.opengl.org/registry/specs/EXT/wgl_swap_control_tear.txt> <https://www.opengl.org/registry/specs/EXT/glx_swap_control_tear.txt> <http://keithp.com/blogs/async_flip/> The extensions utilizes a negative interval value, enabling late swaps to occur without synchronization to the video frame. Hence '-1' has new semantics, previously it was the 'default value' of 'untouched vsync interval'. New default is: - 0 for unrealized context - 1 for realized context +++ It requires [GLX|WGL]_EXT_swap_control, hence we shall ensure to use use this extension in the implementation of GLContext.setSwapInterval(..). +++ Mesa3D seems to support GLX_SGI_swap_control only. +++ Implemented on Windows and X11. +++ On GNU/Linux using NVidia driver w/ my setup(*), sadly the query GLX.glXQueryDrawable(displayHandle, drawable.getHandle(), GLX.GLX_LATE_SWAPS_TEAR_EXT, val); always returns zero here, indicating async vsync is not supported. (Queried the attribute for every frame in windowed or fullscreen mode) Fullscreen (*) - Debian 8 - Kernel 3.16 - KDE/Kwin - GL Version 4.5 (Core profile, arb, compat[ES2, ES3, ES31], FBO, hardware) - 4.5.0 NVIDIA 355.06 [GL 4.5.0, vendor 355.6.0 (NVIDIA 355.06)] - GL_RENDERER GeForce GTX 660/PCIe/SSE2 - Samsung U28D590 (DFP-4): Internal DisplayPort +++
* Merge branch 'Bug1178' of https://github.com/xranby/joglSven Gothel2015-08-261-14/+44
|\
| * Bug 1178: X11UnderlayTracker: Resend identical KeyCode, KeySymbol and KeyCharXerxes Rånby2015-08-251-6/+2
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * Bug 1178: Fix cc3: Set position using LocationOnScreen coordinates.Xerxes Rånby2015-08-251-8/+42
| | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
* | Bug 1188: NEWT WindowsWindow.c: Better support for 'isOnBottom' on Windows ↵Sven Gothel2015-08-261-14/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Fullscreen on Bottom not working though) - Terminology - ALWAYSONBOTTOM -> isOnBottom - ALWAYSONTOP -> isOnTop - Better support for 'isOnBottom' on Windows - Refine 'SetWindowPos(..)' calls to handle isOn[Top|Bottom] - Refine 'ShowWindow(..)' calls to handle isOnBottom - Intercept WM_WINDOWPOSCHANGING to enforce isOn[Top|Bottom], i.e. change params (hwndInsertAfter and flags). - Fullscreen on Bottom not working - While we change all flags appropriately (NOACTIVATE, ..) and don't issue CDS_FULLSCREEN is on bottom, Windows seems to enforce the window to be on top if it is sized to the screen maximum.
* | Bug 1188: Fix API doc of getSupportedStateMask(); Misc Changes (see below)Sven Gothel2015-08-253-31/+29
| | | | | | | | | | | | | | | | - Fix STATE_MASK_CREATENATIVE - Simplify resetStateMask() - Windows WindowDriver: Remove STATE_MASK_STICKY from supported states - TestGearsNEWT: Use NEWTDemoListener
* | NEWT WindowsWindow.c: Fix return value; Add tracking of inOn[Bottom|Top]Sven Gothel2015-08-251-4/+24
| |
* | Bug 1188: Introduce getSupportedStateMask() implemented via WindowDriver's ↵Sven Gothel2015-08-2114-59/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | getSupportedReconfigMaskImpl() - See getSupportedStateMask() for semantics - getSupportedReconfigMaskImpl() result now used for isReconfigureMaskSupported() - getSupportedReconfigMaskImpl() implementations: - Full featured: X11, Windows and OSX - X11: Use WindowManager Atoms for certain features (dynamic) - Others: Use fixed features. - TODO: Consider avoiding actions if not supported.
* | Bug 1188: Refine reconfig state bitsSven Gothel2015-08-202-8/+8
| |
* | Bug 1196: Fix Unresolved strncpy_s (MSVCRT) on WinXPSven Gothel2015-08-201-2/+8
| | | | | | | | | | | | | | | | | | | | Unresolved strncpy_s (MSVCRT) on WinXP, as shown w/ dependency walker (red module, red unresolved line). Mapped: _tcsncpy_s -> strncpy_s (!UNICODE). On WinXP MSVCRT has no strncpy_s. _tcsncpy_s(sOut, sOutLen, s, len) -> bound-check + _tcsncpy(sOut, s, len)
* | Bug 1188: Cleanup public/private[reconfig, non-reconfig] state bitsSven Gothel2015-08-193-17/+19
|/ | | | | | | | | - STATE_BIT_FULLSCREEN_SPAN is private and used for reconfigure, hence STATE_BIT_COUNT_RECONFIG is needed. - STATE_BIT_FULLSCREEN_SPAN is added at the end of public state bits - PSTATE_BIT_MINMAXSIZE_SET is unused.
* Bug 1188: Add @since 2.3.2 tagSven Gothel2015-08-182-14/+86
|
* Merge branch 'Bug1183' of https://github.com/xranby/joglSven Gothel2015-08-181-0/+8
|\
| * Bug 1183: X11RandR13 XRRGetScreenResourcesCurrent _occasionally_ reports ↵Xerxes Rånby2015-08-161-0/+8
| | | | | | | | empty data
* | Bug 1192: NEWT native/X11Display.c Cleanup JNI signatures in commentsXerxes Rånby2015-08-131-6/+6
|/
* Bug 1188: Windows: Implement unresizable using appropriate windows stylesSven Gothel2015-08-122-115/+51
| | | | | | | - to avoid resizing when toggling resizable (change of window border) we maintain 'RECT insets' in our WindowUserData struct and fix the client -> top position late in NewtWindow_setVisiblePosSize(..) after any style change.
* Bug 1188: Refine Maximized on X11 / Impl. Maximized and Iconify on WindowsSven Gothel2015-08-127-176/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | WindowImpl - remove updateMinMaxSize(..) - unused info - fix appendStateToString: show all maximized state changes if reconfig - add sizePosMaxInsetsChanged(..) and sendMouseEventRequestFocus(..) accumulating multiple callbacks from impl. - add: maximizedChanged(..) notification from native impl. - refine manual maximized mode used for OSX and Windows (single extent) - reconfigMaximizedManual(..) - resetMaximizedManual(..) X11 WindowDriver: - Update maximized at xreconfig, read from _NET_WM_STATE - Use less Java callbacks from JNI Windows WindowDriver: - Use native maximized, if HORZ && VERT, otherwise use manual maximized for single extent. - Invisible of top-window -> MINIMIZED/ICONIFY showing the app in task-bar.
* NEWT WindowImpl + WindowDriver: Remove updateInsetsImpl(Insets insets) and ↵Sven Gothel2015-08-1111-64/+5
| | | | | | rely solely on insetsChanged(..) (event driven) Only affected WindowDriver is AWT, which now updates the insets when setVisible(true).
* NEWT OSX WindowDriver: Must wait for resize on main-thread (Related to Bug 1188)Sven Gothel2015-08-111-1/+1
| | | | | | If not waiting for resize on main-thread, corruption may happen at continued rendering. This has been experienced w/ maximize-horizontally (Bug 1188).
* NEWY WindowImpl appendStateBits(..): Refine maximized; Refine WindowDriver's ↵Sven Gothel2015-08-114-7/+14
| | | | reconfig DEBUG
* Bug 1188: OSX: Add maximize horz/vert, implemented manuallySven Gothel2015-08-111-4/+44
|
* Merge branch 'master' of https://github.com/xranby/joglSven Gothel2015-08-111-2/+16
|\
| * Bug 1178: Fix cc10 regression caused by the fix for cc7.Xerxes Rånby2015-08-101-2/+16
| | | | | | | | | | | | | | | | | | | | | | Bug 1178 cc10: We no longer throw an ExceptionInInitializerError when X11 is not available. Fix 1178 cc10: We need to use an X11 resource in the constructor in order to throw an ExceptionInInitializerError if X11 is not available. We can resolve this by query for the X11 display and screen inside the constructor. Signed-off-by: Xerxes Rånby <[email protected]>
* | NEWT WindowDriver's reconfig DEBUG: Add end-of-method dump of current ↵Sven Gothel2015-08-113-6/+13
| | | | | | | | states, dump current and new states upfront.
* | Bug 1188: Fix regression on OSX setVisible: in-visibility never reached on ↵Sven Gothel2015-08-111-5/+5
| | | | | | | | | | | | | | | | | | | | child windows / Fix [Un}Resizable style - Fix regression on OSX setVisible: in-visibility never reached on child windows - Fix 'typo' while porting to bit-mask, i.e. '!=' -> '=='. - Fix [Un}Resizable style - Use NSResizableWindowMask only for !Undecorated and if STATE_MASK_RESIZABLE is set.
* | WindowImpl appendStateBits(..): Fix POINTER* representationSven Gothel2015-08-111-1/+3
| |
* | Bug 1188: Fix regression on X11 setVisible: in-visibility never reached on ↵Sven Gothel2015-08-112-6/+10
|/ | | | | | | | | child windows It has been experienced that UnmapNotify is not sent for child windows when using IconicState! Hence the visible:=false event never reaches the Window, causing an error. This patch only uses IconicState for top-level windows and if requested.
* Bug 1183: Cleanup x11/RandR javadoc and native/X11RandR13 signature commentsXerxes Rånby2015-08-102-3/+3
|
* Bug 1188, Bug 1186: NEWT Window: Support non-resizable, minimize, maximize, ↵Sven Gothel2015-08-1021-715/+2001
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-172-15/+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