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.
This commit is contained in:
parent
bf3198c8c5
commit
a4edfbef02
|
@ -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) ;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue
Block a user