[PATCH 2/2] input: Warn if the touch point up and down events get out of sync

Bill Spitzak spitzak at gmail.com
Tue Sep 24 13:05:53 PDT 2013



Neil Roberts wrote:
> The weston_seat struct now keeps a bit mask of the touch points that
> are pressed so that it can give a warning if it gets a down event for
> a finger that is already down or an up event for one that is already
> up.
> ---
>
> I was using this patch to test bug 67563 but I think it could be a
> good idea to land so that we'll catch similar bugs in future.
I really really think this idea should be changed. Clients should just 
be prepared for excess up and down events, and excess focus in/out. 
Avoiding them becomes nearly impossible as you are probably noticing, 
and pretty much means the compositor must maintain the state of *EVERY* 
button for *EVERY* client. This is a big waste as it is trivial for 
clients to ignore these in the few cases where it will actually cause 
wrong behavior. And to be honest, nobody is going to write a client that 
assumes the events are perfect anyway, so this doubles how much of a 
waste this is.

There should be a "no buttons are held down now" flag on release events. 
This is sufficient for clients to get back in sync with the actual state 
of the hardware if there is a really serious screw up.



More information about the wayland-devel mailing list