Summary: | Add Windows 7 Touch Event Support to Generate NEWT Mouse/Pointer Events | ||
---|---|---|---|
Product: | [JogAmp] Newt | Reporter: | Sven Gothel <sgothel> |
Component: | windows_8 | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | gouessej, rami.santina |
Priority: | --- | ||
Version: | 1 | ||
Hardware: | All | ||
OS: | all | ||
Type: | --- | SCM Refs: |
gluegen 43e5b14bfd0d7ec53bd3c7634e6e95af8ea2afb1
jogl 5b96486da0bcd09d5355f89ec551140e508b567c
jogl 119133e89831fc837015b3f6fd7b258077c93d46
jogl 3c56d9346b9077b5eb65ec9e111917cfe17e9173
|
Workaround: | --- | ||
Bug Depends on: | 861 | ||
Bug Blocks: |
Description
Sven Gothel
2013-08-05 15:11:52 CEST
Using WM_TOUCH messages should work both under Windows 7 and 8: http://msdn.microsoft.com/en-us/library/windows/desktop/dd317341%28v=vs.85%29.aspx (In reply to comment #1) > Using WM_TOUCH messages should work both under Windows 7 and 8: > http://msdn.microsoft.com/en-us/library/windows/desktop/dd317341%28v=vs. > 85%29.aspx If that is true .. and multi touch is supported .. I guess we are good - puhh :) Will check this later on. You can handle the gestures too but with another message. GlueGen native compilation: Enable Win 7 definitions via WINVER/_WIN32_NT 0x0601 Success w/ WM_TOUCH: - availability detection - enabling if available - retrieving multi-touch events - multiple pointer per one WM_TOUCH So the worst scenario, i.e. new windows API is off the table - great. Now working on parsing the multiple pointer of one WM_TOUCH to produce a valid NEWT 'pointer event'. (validated w/ desktop Win7 and Surface Win8) 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. Windows 7 Touch Event Support for NEWT: Fix Focus and 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 |