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

carlosg at gnome.org carlosg at gnome.org
Wed Dec 19 09:42:38 PST 2012


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



More information about the xorg-devel mailing list