From 0fbd779a82919d5dbf8776be9b57a76c0eae6b14 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 19 Dec 2012 18:42:38 +0100 Subject: mi: Ensure pointer emulating touch events update the sprite 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 Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- mi/mieq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mi') diff --git a/mi/mieq.c b/mi/mieq.c index 22f8c91bb..d7d73deb6 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -627,7 +627,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 -- cgit v1.2.3