[PATCH 2/2] Use a new sprite trace for indirect touches when all touches have physically ended

Peter Hutterer peter.hutterer at who-t.net
Wed Mar 7 20:22:28 PST 2012


On Wed, Mar 07, 2012 at 04:06:27PM -0800, Chase Douglas wrote:
> All touches of an indirect device, such as a trackpad, are sent to the
> same window set. When there are no active touches, a new window set is
> created; otherwise, the window set of an existing touch is copied.
> 
> The current code checks for any logically active touches. This includes
> touches that have physically ended but are still logically active due to
> unhandled touch grabs. Instead, we want a new window set whenever there
> are no physically active touches.
> 
> This change skips over logically active but pending end touches, which
> are touches that have physically ended.
> 
> Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
> ---
> This should also be applied to the 1.12 stable series.
> 
>  dix/touch.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/touch.c b/dix/touch.c
> index d04801c..0aa24f2 100644
> --- a/dix/touch.c
> +++ b/dix/touch.c
> @@ -524,7 +524,8 @@ TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite)
>      /* All touches should have the same sprite trace, so find and reuse an
>       * existing touch's sprite if possible, else use the device's sprite. */
>      for (i = 0; i < t->num_touches; i++)
> -        if (t->touches[i].sprite.spriteTraceGood > 0)
> +        if (!t->touches[i].pending_finish &&
> +            t->touches[i].sprite.spriteTraceGood > 0)
>              break;
>      if (i < t->num_touches)
>          srcsprite = &t->touches[i].sprite;
> -- 
> 1.7.9

both applied, thank you.

Cheers,
  Peter


More information about the xorg-devel mailing list