winit icon indicating copy to clipboard operation
winit copied to clipboard

Touch input contact size

Open daxpedda opened this issue 2 years ago • 5 comments

I noticed that it has been really helpful to determine the contact size of a touch input by using PointerEvent.width/height to improve accuracy.

I'm not sure about other platforms, but a quick look at the Windows API revealed POINTER_TOUCH_INFO.rcContact. In any case, like force, this could be wrapped in an Option.

daxpedda avatar Jul 09 '23 20:07 daxpedda

Wayland should have it as well https://wayland.app/protocols/wayland#wl_touch:event:shape

kchibisov avatar Jul 14 '23 04:07 kchibisov

The thing is that device may not support reporting the shape of the input, so I'd assume it must be an Option.

kchibisov avatar Jul 14 '23 04:07 kchibisov

Also, it's an ellipse and not a rectangle on Wayland, so it's a bit weird here.

kchibisov avatar Jul 14 '23 04:07 kchibisov

After some digging into this lately, all these APIs are meant to represent ellipsis.

daxpedda avatar Jul 23 '24 11:07 daxpedda

Just stumbled on Navigator.maxTouchPoints as well, didn't dig into cross-platform APIs yet.

daxpedda avatar Aug 03 '24 08:08 daxpedda