[PATCH inputproto xi 2.1] Updates for pointer emulation and more touch device modes

Daniel Stone daniel at fooishbar.org
Wed Mar 2 03:34:43 PST 2011


Hi,

On Wed, Mar 02, 2011 at 10:58:08AM +0000, Daniel Stone wrote:
> On Tue, Feb 22, 2011 at 10:06:37AM -0500, Chase Douglas wrote:
> > +In order to prevent touch events delivered to one window while pointer events
> > +are implicitly grabbed by another, all touches from indirect devices will end
> > +when an implicit grab is activated on the slave or attached master device. New
> > +touches may begin while the device is implicitly grabbed.
> 
> This bit makes me _nervous_.  Unfortunately we can only activate one
> pointer grab at a time, but I'd rather do something like this:
>     * populate the window set with the pseudocode described near the top
>       when the touch begins, regardless of the pointer state
>     * generate touch events as normal
>     * if ownership is passed to a pointer grab/selection, skip it if
>       a pointer grab is already active on the delivering device (the MD
>       if the selection was on the MD ID or XIAllMasterDevices, otherwise
>       the SD)

Let me clarify a bit.  Assume we have the following scenario:
* root window R, touch grab by gesture recogniser
  * window manager frame window W, pointer button 1 grab for
    click-to-raise
    * client window C, touch selection

If we do a two-finger scroll on C, we'll get the following:
  - touch 1 down, owned by R
  - touch 2 down, owned by R
  - touch 1 rejected by R, ownership passed to W, touch 2 ended before R
    can reject it!
  - touch 1 rejected by W, ownership passed to C
  - touch 1 physically ends
  - touch 2 physically ends

This means C will never see the scroll.  If we just ignore the pointer,
we will skip straight from R to C if R rejects it: if C selects for
unowned events, it will at least know that touch 1 is still owned by
someone above it in the window tree who hasn't decided what to do with
it yet, and can wait to perform gesture recognition.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110302/86100e12/attachment-0001.pgp>


More information about the xorg-devel mailing list