virtualx-engine/platform/javascript
Pedro J. Estébanez e10a2e5999 Implement universal translation of touch to mouse
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)

The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.

Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.

*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.

On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.

Plus: Improve/fix tracking of current mouse position.
2018-04-30 19:04:35 +02:00
..
api Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
export HTML export: Make s3tc the standard Texture Format 2018-01-20 15:20:26 +01:00
audio_driver_javascript.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
audio_driver_javascript.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
detect.py Disable OpenSSL module in HTML5 platform by default 2018-01-25 09:07:07 +01:00
dom_keys.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
engine.js Initialize WebGL context in OS 2018-01-07 15:49:48 +01:00
http_client.h.inc Warn when polling HTTPClient synchronously in HTML5 platform 2018-02-19 22:42:31 +01:00
http_client_javascript.cpp Flush HTTPClient response data only on request/close in HTML5 platform 2018-02-19 22:42:38 +01:00
http_request.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
http_request.js Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
javascript_eval.cpp Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
javascript_main.cpp Fix internal Emscripten JS API calls 2018-01-06 15:53:04 +01:00
logo.png Fixed iCCp chunk in pngs 2016-06-22 21:13:29 +02:00
os_javascript.cpp Implement universal translation of touch to mouse 2018-04-30 19:04:35 +02:00
os_javascript.h Fix HTML5 feature tags 2018-01-12 00:32:17 +01:00
platform_config.h Add missing copyright headers and fix formatting 2018-01-05 01:22:23 +01:00
power_javascript.cpp Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
power_javascript.h Update copyright statements to 2018 2018-01-01 14:40:47 +01:00
pre.js Remove asm.js support from HTML5 platform 2017-11-18 05:52:14 +01:00
run_icon.png Use custom native-run icons for Android and HTML5 2017-06-27 21:06:26 +02:00
SCsub Wrap Emscripten module into JS Engine singleton per SCons 2018-01-13 19:40:59 +01:00