Comment 16 for bug 1038615

Revision history for this message
In , Jason Gerecke (killertofu) wrote :

After some poking around, I think I've tracked down the cause of this behavior.

When touching (but not pressing) a button, the kernel driver mostly ignores the hardware event it receives. The out-of-prox logic is triggered, and we send an event indicating the pad has left proximity. The problem is that since the pad never *entered* proximity, it can leave the X driver a little confused.

When a new packet comes in from the kernel, the X driver uses the serial number to find the appropriate "channel" to store event data in. It then updates the most-recent information in that channel with the packet data and processes the result as an event. An excess out-of-prox event starts from an empty state, causing the driver to ask the kernel for the tool that is currently in proximity. If it finds something, an empty event is sent for that tool, causing a momentary jump to the top-left corner.

There are two ways I see to fix this bug: a) have the kernel send an (empty) in-prox event for button touches so the X driver doesn't get confused, b) have the X driver ignore out-of-prox events for already out-of-prox tools.