Add pen support for OSR

Merged
#211 · Created  · Last updated

Merged pull request

Add pen support for OSR (issue #1059)

7b5d30e·Author: ·Closed by: ·2019-03-07

Description

The recent support for OSR multi-touch events (issue #1059) hard-coded all touches points to be fingers. This small PR makes it possible to define the pointer / device type that triggers the event. In practice this adds pen support to the existing multi-touch events.

Notice that even though the new CEF pointer types directly map to ui::MotionEvent::ToolType, I’m still using the terminology from blink::WebPointerProperties::PointerType and Pointer Events, so pen instead of stylus, touch instead of finger, and pointer type instead of tool type. Eventually Chromium will move into unified pointer event model and hopefully only use pointer events.

I didn’t add support to cefclient for this, since on mac the whole multi-touch support is just an emulation anyway, on Linux there is no good way to differentiate between pen and touch events on XI (Chromium, Gtk and Qt do this based on hard-coded list of device names that most likely are pens instead of touch devices), and on Windows we use the older WM_TOUCH API for Win7 compatibility that doesn’t have proper support for pens.

0 attachments

0 comments

Loading commits...