[PATCH] Update rootX/rootY when replaying events

Thomas Jaeger ThJaeger at gmail.com
Sat Jan 3 14:19:55 PST 2009


This ensures that the actual motion history is replayed and that clients
know the current pointer position.
---
 dix/events.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index bd56f3b..ac5adcc 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -2558,7 +2558,7 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev)
 	return XineramaCheckMotion(xE, pDev);
 #endif
 
-    if (xE && !syncEvents.playingEvents)
+    if (xE)
     {
         /* GetPointerEvents() guarantees that pointer events have the correct
            rootX/Y set already. */
@@ -2602,8 +2602,8 @@ CheckMotion(xEvent *xE, DeviceIntPtr pDev)
 	    ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y);
 	pSprite->hotPhys = pSprite->hot;
 
-	if ((pSprite->hotPhys.x != *rootX) ||
-	    (pSprite->hotPhys.y != *rootY))
+	if (!syncEvents.playingEvents &&
+	    ((pSprite->hotPhys.x != *rootX) || (pSprite->hotPhys.y != *rootY)))
 	{
 	    (*pSprite->hotPhys.pScreen->SetCursorPosition)(
                 pDev, pSprite->hotPhys.pScreen,
-- 
1.6.0.4


--------------000500000603010802090802--


More information about the xorg mailing list