misprite: Do window check first for Get{Image,Spans} too

This commit is contained in:
Adam Jackson 2009-03-27 11:54:52 -04:00
parent 8beced6c02
commit 2c000f4980

View File

@ -329,15 +329,15 @@ miSpriteGetImage (DrawablePtr pDrawable, int sx, int sy, int w, int h,
SCREEN_PROLOGUE (pScreen, GetImage);
if (pDrawable->type == DRAWABLE_WINDOW)
{
pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey);
for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
{
if (DevHasCursor(pDev))
{
pCursorInfo = MISPRITE(pDev);
if (pDrawable->type == DRAWABLE_WINDOW &&
pCursorInfo->isUp &&
pCursorInfo->pScreen == pScreen &&
if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen &&
ORG_OVERLAP(&pCursorInfo->saved,pDrawable->x,pDrawable->y,
sx, sy, w, h))
{
@ -346,6 +346,7 @@ miSpriteGetImage (DrawablePtr pDrawable, int sx, int sy, int w, int h,
}
}
}
}
(*pScreen->GetImage) (pDrawable, sx, sy, w, h,
format, planemask, pdstLine);
@ -364,6 +365,8 @@ miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
SCREEN_PROLOGUE (pScreen, GetSpans);
if (pDrawable->type == DRAWABLE_WINDOW)
{
pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey);
for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
@ -372,9 +375,7 @@ miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
{
pCursorInfo = MISPRITE(pDev);
if (pDrawable->type == DRAWABLE_WINDOW &&
pCursorInfo->isUp &&
pCursorInfo->pScreen == pScreen)
if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen)
{
DDXPointPtr pts;
int *widths;
@ -400,6 +401,7 @@ miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
}
}
}
}
(*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);