xserver: Branch 'mpx'

Peter Hutterer whot at kemper.freedesktop.org
Sun Nov 25 23:32:29 PST 2007


 mi/mipointer.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a4edfbef022f9635c2c9b9eb229cb622834dc68c
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Sat Nov 24 16:16:48 2007 +1030

    mi: only call UpdateSpriteForScreen if the screen actually changed.
    
    If we call it unconditionally, we flip the dev->spriteInfo->sprite permanently
    when using XTestFakeInput (once in CheckMotion as called from the
    processInputProc, another time in UpdateSpriteForScreen when we actually warp
    the cursor). USFS also updates to the screen's root window unconditionally,
    which is not really what we want if we haven't changed screen at all.

diff --git a/mi/mipointer.c b/mi/mipointer.c
index b2f31c1..ff58823 100644
--- a/mi/mipointer.c
+++ b/mi/mipointer.c
@@ -359,6 +359,7 @@ miPointerWarpCursor (pDev, pScreen, x, y)
     int	   	 x, y;
 {
     miPointerPtr pPointer;
+    BOOL changedScreen = FALSE;
     
     if (!pDev->isMaster && !pDev->u.master)
         return;
@@ -366,7 +367,10 @@ miPointerWarpCursor (pDev, pScreen, x, y)
     SetupScreen (pScreen);
 
     if (pPointer->pScreen != pScreen)
+    {
 	(*pScreenPriv->screenFuncs->NewEventScreen) (pDev, pScreen, TRUE);
+        changedScreen = TRUE;
+    }
 
     if (GenerateEvent)
     {
@@ -387,7 +391,8 @@ miPointerWarpCursor (pDev, pScreen, x, y)
 	pPointer->y = y;
 	pPointer->pScreen = pScreen;
     }
-    UpdateSpriteForScreen (pDev, pScreen) ;
+    if (changedScreen)
+        UpdateSpriteForScreen (pDev, pScreen) ;
 }
 
 /*


More information about the xorg-commit mailing list