Multitouch protocol and misbehaving clients

Carlos Garnacho carlos at lanedo.com
Wed Aug 31 11:06:22 PDT 2011


Hello,

I've been following the latest changes to the XInput protocol for
multitouch and doing practical experiments with the Ubuntu shipped XI2.1
on Mutter/Gnome-shell.

Overall, the protocol description looks quite polished now, although I'm
quite concerned about the strict dependence of the server on grabbing
clients calling XIAllowTouchEvents(), and how it has no way to handle
misbehaving clients.

Here are a few points I think it'd be good to restrain and clarify:

      * What happens if a client fails to accept/reject a touch
        sequence?
      * What happens if a missed, physically finished touch sequence
        owned the pointer emulation? should pointer emulation be carried
        over to a newly started touchpoint? The XI2proto changes mention
        that pointer emulation is "implementation defined", so this
        might fall into such implementation details.

Perhaps these two issues should just be dealt with as stale active
grabs, and release the touch sequences as soon as the client that's
stuck with these disappears. 

However, the unbounded amount of stale resources the server could create
for unfinished touch sequences until the client quits is somewhat
concerning. And in that situation, just transferring ownership onto the
next client not listening to unowned events might mean lots of old, out
of context touches that would be misinterpreted as "recent enough" when
these are replayed.

I will send a draft patch with my proposed changes to inputproto,
multitouch-devel branch.

Cheers,
  Carlos



More information about the xorg-devel mailing list