[PATCH 1/2] mi: Ensure pointer emulating touch events update the sprite

Peter Hutterer peter.hutterer at who-t.net
Wed Dec 19 18:49:23 PST 2012


On Wed, Dec 19, 2012 at 06:42:38PM +0100, carlosg at gnome.org wrote:
> From: Carlos Garnacho <carlosg at gnome.org>
> 
> Different miPointerSpriteFuncRec implementations do a varying
> business at ultimately calling miPointerUpdateSprite(), this
> particularly fails when using the plain mi sprite on touch events,
> where the sprite is just moved/updated on cursor changes.
> 
> So, ensure miPointerUpdateSprite() is called generically for
> pointer emulating touch events as with regular motion events.
> 
> Signed-off-by: Carlos Garnacho <carlosg at gnome.org>
> ---
>  mi/mieq.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/mi/mieq.c b/mi/mieq.c
> index b2c7769..d374b28 100644
> --- a/mi/mieq.c
> +++ b/mi/mieq.c
> @@ -623,7 +623,11 @@ mieqProcessInputEvents(void)
>          mieqProcessDeviceEvent(dev, &event, screen);
>  
>          /* Update the sprite now. Next event may be from different device. */
> -        if (event.any.type == ET_Motion && master)
> +        if (master &&
> +            (event.any.type == ET_Motion ||
> +             ((event.any.type == ET_TouchBegin ||
> +               event.any.type == ET_TouchUpdate) && 
> +              event.device_event.flags & TOUCH_POINTER_EMULATED)))
>              miPointerUpdateSprite(dev);
>  
>  #ifdef XQUARTZ
> -- 
> 1.8.0.1

both merged, thanks.

Cheers,
   Peter
> 


More information about the xorg-devel mailing list