xpra icon
Bug tracker and wiki

Opened 16 months ago

Last modified 6 months ago

#1615 assigned task

touch device support

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 3.0
Component: core Version: trunk
Keywords: Cc:

Description (last modified by Antoine Martin)

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..

Change History (7)

comment:1 Changed 16 months ago by Antoine Martin

Description: modified (diff)
Status: newassigned

comment:2 Changed 8 months ago by Antoine Martin

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


  • 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..

Last edited 8 months ago by Antoine Martin (previous) (diff)

comment:3 Changed 8 months ago by Antoine Martin

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?


  • we probably should not be pressing / unpressing with each motion packet (as per above: use separate packets)
Last edited 8 months ago by Antoine Martin (previous) (diff)

comment:4 Changed 8 months ago by Antoine Martin

Description: modified (diff)

comment:5 Changed 7 months ago by Antoine Martin

Milestone: 2.33.0

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

comment:6 Changed 7 months ago by Antoine Martin

Description: modified (diff)

comment:7 Changed 6 months ago by Antoine Martin

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().

Note: See TracTickets for help on using tickets.