| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
KeyListener.keyTyped(KeyEvent)
|
|
|
|
|
|
|
| |
(dummy) and NEWT
Free the colormap at WindowDestroy, which we have created at WindowCreate w/ AllocNone.
Due to the fact we used 'AllocNone' the leak is minimal though ..
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
start RandR13 coding.
|
|
|
|
| |
to pluggable impl. for RandR 1.1 and 1.3 (todo)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clean! Also brought back my safe showCursor logic.
The code was not compile clean:
- declaration after use w/o prototype!
- missing var declaration 'success'!
- 'pointerVisible=0', instead of 'wud->pointerVisible=0' var. not found!
Used my old safe show cursor logic, while removing the max count,
which was redundant, since we can check whether the counter moves
in the right direction.
|
|
|
|
| |
SafeShowCursor(..)
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
lower-case UTF-16 character.
|
| |
| |
| |
| | |
clear we need to enqeue the events
|
| |
| |
| |
| | |
dead-keys (zero keyChar); For 'unshifted' keySym's also unmask Ctrl and Mod* states
|
| |
| |
| |
| | |
OSX JNI attachments to save time since detachment is skipped.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
dependent and UTF-16 keyChar value
On X11, the layout dependent keySym was not delivered [1],
as well as the UTF-8 to UTF-16 translation was missing [2].
[1] is solved using XLookupString w/o ShiftMask
[2] is solved using JNI's NewStringUTF, which takes UTF-8.
|
|/
|
|
|
|
|
| |
Windows and OSX
- X11: Memorize pressed Alt_R to decide which 'alt' has to be used for non key modifier fetching
- Windows: Only use GetKeyState(..) and compare the US vkey, since int. kbd layout use reduced scancode
|
|
|
|
|
|
|
| |
commit 85338858f5c58694fa88e77df1386d0556887944
Commit replaced enqueueMouseEventID w/ sendMouseEventID, while not removing the 'jboolean wait' argument.
This also lead to staying in DRAGGED mode when mouse left the window.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bugs w/ parenting
Fix native window parenting freeze:
- Pull out setJavaWindowObject(..) of changeContentView(..) to be called seperately,
add param for changeContentView(..) to enable/disable setJavaWindowObject()
- initWindow0(..):
- Call changeContentView(..) w/o setJavaWindowObject()
- setJavaWindowObject(..) at end of initialization
Fix native window parenting orderOut0:
If parent window is invisible or no parent used call orderOut(..),
otherwise call orderBack().
Fix updatePosition(..): positionChanged(..) - Position bug w/ parenting
- AWT parent passed 0/0
- call positionChanged(..) w/ client-pos instead of screen-pos
Fix getLocationOnScreenImpl(..) - Position bug w/ parenting
- Position < 0/0 is valid!
Misc:
- setWindowClientTopLeftPointAndSize0(..), setWindowClientTopLeftPoint0(..):
Add 'display' param, deciding whether area should be display (invalidated)
|
|
|
|
|
|
|
|
|
| |
Continues commit 81cbcdc8469143587b2044661dd613c798ae02ba
Perform on main-thread invocation from Java, allowing to issue
visibleChanged(..) after creation/visible calls.
This fixes the 'Visibility not reached ..' regressions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on main-thread w/o blocking; NEWT/WindowImpl: Volatile multithreaded mutable values
Similar to commits:
28c6472335b924080d638b33a28f8f4eedb459b1
f354fb204d8973453c538dda78a2c82c87be61dc
main-thread operations cannot block main-thread.
Luckily we are able to create the NSWindow and NSView instance uninitialized (deferred) on the current thread,
while issuing their initialization on the main-thread w/o blocking.
Further more a size glitch is fixed, which didn't take the title bar into account.
+++
NEWT/WindowImpl: Volatile multithreaded mutable values
Since position, size and other attributes might get changes off-thread, these fields needs to be volatile.
|
|
|
|
|
|
| |
screen position (Fixes resize -> position)
- Tested w/ NEWT GearsES2 and Java6 and Java7 on OSX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
KeyEvent handling while distinguish keyCode (kbd layout independent) and keySym (kbd layout dependent)
API Changes:
- Virtual key codes and symbols are of type short.
- KeyEvent.keySymbol() shall return a layout dependent value (Bug 641)
- Method returns former keyCode() value, which was layout dependent.
- Returns 'short' value
- KeyEvent.keyCode() returns a short value, instead of int
- KeyEvent.keyCode() shall return a layout independent value (Bug 641)
- To ease implementation, we only 'require' the scan code to be mapped to a 'US Keyboard layout',
which allows reusing layout dependent code while preserving the goal to have a fixed physical key association
- Implementation status:
- Windows OK
- X11 TODO
- OSX: 50/50 TODO
- Using layout independent 'action keys'
- Using layout dependent 'printable keys'
- returning above semantics for both, keyCode and keySym
- Android 50/50 TODO
- Returning the layout independent keyCode
- Mapping probably incomplete
- KeyEvent.EVENT_KEY_TYPED and KeyListener.keyTyped(KeyEvent) (Bug 688)
- Marked DEPRECATED
- No more called for auto-repeat events
- Synthesized in WindowImpl.consumeKeyEvent(..): No more injection by native- or java driver code
- NEWTEvent.eventType: int -> short
- field, as well as all method involving eventType changed to short.
- NEWTEvent.isSystemEvent: REMOVED
- Never used as well as never being implemented properly
Internal Changes:
- Simplified keyEvent driver code
- Especially the Windows native driver's mapping code
could be simplified using scanCode and MapVirtualKeyEx
- NEWT Event Factories: hashMap -> switch/case
Unit Tests:
-
- Added NewtCanvasAWT Offscreen Layer Tests
important to test the AWT -> NEWT translation on OSX/CALayer:
- TestNewtKeyCodeModifiersAWT
- TestNewtKeyCodesAWT
- TestNewtKeyEventAutoRepeatAWT
- TestNewtKeyEventOrderAWT
- TestNewtKeyPressReleaseUnmaskRepeatAWT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on Main-Thread.
- Fix Memory Leak
- NewtWindow::dealloc -> [NewtView release]: Fixes NewtView leak
- NewtView::dealloc -> removeTrackingRect: Removes occasional crash (double free of TrackingRect)
- Fix Occasional Crash Duer to Lifecycle Ops not on Main-Thread.
Perform OSX WindowDriver ops on Main-Thread:
- close0
- changeContentView0
- createWindow0
- Cleaned up AddRemove unit tests, added TestAddRemove03GLWindowNEWT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
KeyEventListener (-> On Windows as well)
The following is observed, where t0 and t1 refer to subsequent different timestamps:
NEWT delivery order:
PRESSED (t0), RELEASED (t1) and TYPED (t1)
WINDOWS delivery order:
PRESSED (t0), TYPED (t0) and RELEASED (t1)
Windows Auto-Repeat:
PRESSED (t0), TYPED (t0)
Hence we changed the event reorder-code in NEWT to trigger NEWT-PRESSED on
Windows-TYPED for printable chars, assuring key-char values on all listener callbacks.
- KeyEvent.getKeyChar(): Removed disclaimer dedicated for Windows
- Keyevent.isActionKey(): Completed for all NEWT non-printable action keys; Added static variant
- Keyevent.isPrintableKey(): NEW: returns !isModifierKey(keyCode) && !isActionKey(keyCode) ; With static variant
- Windows WindowDriver:
- EVENT_KEY_PRESSED handles non-printable chars only
- EVENT_KEY_TYPE handles printable chars only
- Native: VK_DELETE passes keyCode
- Unit tests: Wait for completion 1s -> 2s
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Horizontal Scrolling Behavior (OSX, X11, Win32); Bug 639: High-Res Mouse-Wheel
- API update 'float getWheelRotation()':
Usually a wheel rotation of > 0.0f is up, and < 0.0f is down.
Usually a wheel rotations is considered a vertical scroll.
If isShiftDown(), a wheel rotations is considered a horizontal scroll,
where shift-up = left = > 0.0f, and shift-down = right = < 0.0f.
However, on some OS this might be flipped due to the OS default behavior.
The latter is true for OS X 10.7 (Lion) for example.
The events will be send usually in steps of one, ie. -1.0f and 1.0f.
Higher values may result due to fast scrolling.
Fractional values may result due to slow scrolling with high resolution devices.
The button number refers to the wheel number.
- Fix Bug 659: NEWT Horizontal Scrolling Behavior (OSX, X11, Win32)
- See new API doc above
- X11/Horiz: Keep using button1 and set SHIFT modifier
- OSX/Horiz:
- PAD: Use highes absolute scrolling value (Axis1/Axis2)
and set SHIFT modifier for horizontal scrolling (Axis2)
- XXX: Use deltaX for horizontal scrolling, detected by SHIFT modifier. (traditional)
- Windows/Horiz:
- Add WM_MOUSEHWHEEL support (-> set SHIFT modifier), but it's rarely impl. for trackpads!
- Add exp. WM_HSCROLL, but it will only be delivered if windows has WS_HSCROLL, hence dead code!
- Android:
- Add ACTION_SCROLL (API Level 12), only used if layout is a scroll layout
- Using GestureDetector to detect scroll even w/ pointerCount > 2, while:
- skipping 1st scroll event (value too high)
- skipping other events while in-scroll mode
- waiting until all pointers were released before cont. normally
- using View config's 1/touchSlope as scale factor
- Fix Bug 639: High-Res Mouse-Wheel
- getWheelRotation() return value changed: int -> float
allowing fractions, see API doc changes above.
- Fractions are currently supported natively (API) on
- Windows
- OSX
- Android
- AndroidNewtEventFactory ir refactored (requires an instance now) and
AndroidNewtEventTranslator (event listener) is pulled our of Android WindowDriver.
|