Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

touch device support #1615

Open
totaam opened this issue Aug 7, 2017 · 6 comments
Open

touch device support #1615

totaam opened this issue Aug 7, 2017 · 6 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Aug 7, 2017

Follow up from #1611, see also #173.

Most useful for the HTML5 client (support for precise wheel events added in #1797), which can listen for touch events, suppress the regular clicks and use the new API instead.
We'll probably need to create a uinput touch device, udev rules, etc..

Platform support is going to be "interesting": Understanding touch events as every browser does something slightly different..

@totaam
Copy link
Collaborator Author

totaam commented Mar 30, 2018

Lots of support code and fixes (may backport some) in r18916, see commit message for details.

TODO:

  • maybe use a separate packet handlers for touch devices - difficult to overload pointer packets with extra attributes like "pressure"
  • figure out how to tell uinput to specify the device resolution so libinput won't ignore the device completely:
(EE) event22 - Xpra Virtual Touchpad GrEnQD3pMAR9: libinput bug: missing tablet capabilities: btn-stylus resolution.Ignoring this device.
  • don't restrict to just 2 axes when validating touch devices (but still only support 2)
  • maybe validate the virtual touch device after we validate the virtual pointer
  • multi-touch, etc

As for browser support, here are some tests: Touch/pointer tests and demos but my tablet isn't seen as a touch device by chrome..

@totaam
Copy link
Collaborator Author

totaam commented Mar 30, 2018

The "Xpra Virtual Touchpad" device is working and enabled as of r18918 (just needed to figure out the magic incantation for uinput)
r18928 allows us to disable the "touchpad" and "pointer" virtual device initialization individually.
We normalize the coordinates using the virtual screen size, maybe this should be using the client's screen size instead? Or some other reliable unit?

New TODO:

  • we probably should not be pressing / unpressing with each motion packet (as per above: use separate packets)

@totaam
Copy link
Collaborator Author

totaam commented Apr 22, 2018

This needs more work, so r19051 disables the touchpad emulation by default, for now.

@totaam
Copy link
Collaborator Author

totaam commented May 16, 2018

See also Input Device Capabilities: This causes problems for developers when supporting both mouse and touch input. It's difficult to know if a mousedown event actually represents new input from a mouse, or is just a compatibility event for a previously-processed touchstart event. - probably doesn't apply to us since we preventDefault().

@totaam
Copy link
Collaborator Author

totaam commented Dec 11, 2018

See also #2073

@totaam
Copy link
Collaborator Author

totaam commented Dec 25, 2023

For shadow sessions, see #3831

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant