[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 19:48:38 PDT 2013



Neil Roberts wrote:
> Bill Spitzak <spitzak at gmail.com> writes:
>
>   
>> 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.
>>     
>
> In this case the problem is that Weston is internally missing some touch
> up events and it doesn't even involve the clients. Weston really needs
> to know how many touch points are pressed so that it can tell if a new
> touch is the first one in order to decide which surface to send the
> events to. I don't think there is a good way to do this without assuming
> the up and down events we get from the input driver are consistent. This
> patch could help catch problems like that in future.

I think this can be solved by adding a "nothing is now pushed down" flag 
to the up events. When the user lets go then the low-level driver should 
send this fact. The compositor then knows it missed some touch-up 
events. It also sends the flag on to clients (even if it determined it 
did not miss any touch-up events) so the client can fix any screwups it did.

It is true that at the very lowest level the driver has got to get the 
state correct. Though in many cases I think the "no buttons are pressed" 
state can be detected without tracking all up/down transitions.



More information about the wayland-devel mailing list