New approach to multitouch using DIDs and bitmasked events

Chase Douglas chase.douglas at canonical.com
Fri Jul 2 06:37:36 PDT 2010


On Fri, 2010-07-02 at 11:00 +0200, Henrik Rydberg wrote:
> Chase Douglas wrote:
> [...]
> > I heuristically determine if a device is a DID by checking whether it
> > has valuators for ABS_MT_POSITION_X or ABS_MT_POSITION_Y, but none of
> > ABS_X, ABS_Y, REL_X, or REL_Y. This check is performed at valuator class
> > device initialization.
> 
> The magic mouse is the only MT device in the kernel that sends nothing but MT
> events, so this detection method has very limited use. Perhaps a DID does not
> have to send only direct motion events?

After thinking about this some more, it may make more sense to have the
input module set the DeviceIntPtr direct flag when it feels the device
should be direct.

As for whether a DID can only send direct motion events, we could
instead just send direct motion events at all times for just MT events,
but maybe that ties our hands further down the line when we want to use
direct events for other types? I suppose in the future we could specify
a bitmask for direct just like we do for absolute vs relative?

After thinking about this some more, I think it makes sense to not
specify that a device itself is direct, but send MT events directly for
all devices. I'll modify the code for this as well.

Thanks,

-- Chase



More information about the xorg-devel mailing list