New approach to multitouch using DIDs and bitmasked events

Chase Douglas chase.douglas at canonical.com
Wed Jul 7 14:43:26 PDT 2010


On Wed, 2010-07-07 at 17:34 -0400, Timothy Meade wrote:
> > ...
> 
> > I hacked some more today, and I'm not sure we need a separate XI2 event
> > type. I'm going to send out another RFC "pull request" with the work
> > soon, but as an overview I wanted to work on the "magicmouse" scenario.
> > The result is the following:
> >
> > MT Touchscreen:
> >  - Device is marked as a DID
> >  - Starts out floating, can't be attached
> >  - MT touch coordinates are the first two valuators, XIDeviceEvents are
> >    in screen coordinates. However, an app can grab XIRawEvents for
> >    device coordinates. *
> >  - Since it's a DID, button events are also blocked for core, XI1
> 
> > ...
> 
> In the MT touchscreen case, what does "attached" refer to? I can think
> of a MT touchscreen which also has DPAD key input that I might want to
> be able to map as a second mouse pointer, or more likely an optical
> sensor. In other cases, like the Blackberry Storm/Thunder, there's a
> click event on the MT touchscreen.

I was referring to the concept of master and slave devices in XI2. Slave
devices represent physical input devices: a microsoft mouse, a wacom
touchscreen, etc. Master devices generally represent pointers in X. So
if you have a mouse and a touchpad as slave devices attached to one
master device, when you use either physical device it will move the
single pointer on screen.

The DIDs idea is essentially that they cannot be attached to a master
pointer, and thus cannot send motion events to a typical X pointer.
However, XI2 clients can still see these "floating" slave devices.

In your case, it sounds like you would want two master pointers: one
attached to the touchscreen (I'm overlooking the MT fact here and
assuming single touch), and one attached to the DPAD key input.

I haven't thought about the Blackberry case. I'm not sure it needs
anything special though.

-- Chase



More information about the xorg-devel mailing list