[PATCH] Don't end touchpoint if owning client hasn't accepted/rejected

Peter Hutterer peter.hutterer at who-t.net
Thu Jan 5 19:55:32 PST 2012


On Wed, Jan 04, 2012 at 03:50:40PM -0800, Chase Douglas wrote:
> A touchpoint is ended when no further processing will take place for it.
> This includes the situation where there is only one grabbing client, and
> the client receives a touch end before it has accepted/rejected the
> touchpoint.
> 
> This change ensures that a delivered touch end event is converted into a
> touch update event under the above scenario. If the event is left as a
> touch end event, the touchpoint will be ended in ProcessTouchEvent().
> 
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
>  Xi/exevents.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Xi/exevents.c b/Xi/exevents.c
> index db49e31..b3b05f7 100644
> --- a/Xi/exevents.c
> +++ b/Xi/exevents.c
> @@ -1803,8 +1803,10 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
>                  rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
>              listener->state = LISTENER_HAS_END;
>          }
> -        if (ti->num_listeners > 1 &&
> -           (ev->device_event.flags & (TOUCH_ACCEPT|TOUCH_REJECT)) == 0)
> +        if ((ti->num_listeners > 1 ||
> +             (listener->type == LISTENER_GRAB &&
> +              xi2mask_isset(xi2mask, dev, XI_TouchOwnership))) &&
> +            (ev->device_event.flags & (TOUCH_ACCEPT|TOUCH_REJECT)) == 0)
>          {
>              ev->any.type = ET_TouchUpdate;
>              ev->device_event.flags |= TOUCH_PENDING_END;
> -- 
> 1.7.7.3

applied, thanks.

Cheers,
  Peter


More information about the xorg-devel mailing list