summaryrefslogtreecommitdiff
path: root/mi/mipointer.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-11-24 16:16:48 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-11-24 16:16:48 +1030
commita4edfbef022f9635c2c9b9eb229cb622834dc68c (patch)
tree9db470711436640d466703d63a4e7c91c7e64209 /mi/mipointer.c
parentbf3198c8c56289244c58d36c6869442479fd3481 (diff)
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.
Diffstat (limited to 'mi/mipointer.c')
-rw-r--r--mi/mipointer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mi/mipointer.c b/mi/mipointer.c
index b2f31c1d5..ff5882380 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) ;
}
/*