summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-03-27 11:54:52 -0400
committerAdam Jackson <ajax@redhat.com>2009-03-27 11:54:52 -0400
commit2c000f4980d30015e6da95de3c77c0fdda0090e4 (patch)
tree4fb798d30e0f9e1c28fea532f02b265900fbac0e /mi
parent8beced6c02610444105f3d0b8ee3a49e1072096d (diff)
misprite: Do window check first for Get{Image,Spans} too
Diffstat (limited to 'mi')
-rw-r--r--mi/misprite.c80
1 files changed, 41 insertions, 39 deletions
diff --git a/mi/misprite.c b/mi/misprite.c
index ebd137ed9..ff727d551 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -329,21 +329,22 @@ miSpriteGetImage (DrawablePtr pDrawable, int sx, int sy, int w, int h,
SCREEN_PROLOGUE (pScreen, GetImage);
- pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
- for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
+ if (pDrawable->type == DRAWABLE_WINDOW)
{
- if (DevHasCursor(pDev))
+ pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey);
+ for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
{
- pCursorInfo = MISPRITE(pDev);
- if (pDrawable->type == DRAWABLE_WINDOW &&
- pCursorInfo->isUp &&
- pCursorInfo->pScreen == pScreen &&
- ORG_OVERLAP(&pCursorInfo->saved,pDrawable->x,pDrawable->y,
- sx, sy, w, h))
- {
- SPRITE_DEBUG (("GetImage remove\n"));
- miSpriteRemoveCursor (pDev, pScreen);
- }
+ if (DevHasCursor(pDev))
+ {
+ pCursorInfo = MISPRITE(pDev);
+ if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen &&
+ ORG_OVERLAP(&pCursorInfo->saved,pDrawable->x,pDrawable->y,
+ sx, sy, w, h))
+ {
+ SPRITE_DEBUG (("GetImage remove\n"));
+ miSpriteRemoveCursor (pDev, pScreen);
+ }
+ }
}
}
@@ -364,37 +365,38 @@ miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt,
SCREEN_PROLOGUE (pScreen, GetSpans);
- pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey);
-
- for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
+ if (pDrawable->type == DRAWABLE_WINDOW)
{
- if (DevHasCursor(pDev))
- {
- pCursorInfo = MISPRITE(pDev);
+ pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey);
- if (pDrawable->type == DRAWABLE_WINDOW &&
- pCursorInfo->isUp &&
- pCursorInfo->pScreen == pScreen)
+ for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
+ {
+ if (DevHasCursor(pDev))
{
- DDXPointPtr pts;
- int *widths;
- int nPts;
- int xorg,
- yorg;
-
- xorg = pDrawable->x;
- yorg = pDrawable->y;
-
- for (pts = ppt, widths = pwidth, nPts = nspans;
- nPts--;
- pts++, widths++)
+ pCursorInfo = MISPRITE(pDev);
+
+ if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen)
{
- if (SPN_OVERLAP(&pCursorInfo->saved,pts->y+yorg,
- pts->x+xorg,*widths))
+ DDXPointPtr pts;
+ int *widths;
+ int nPts;
+ int xorg,
+ yorg;
+
+ xorg = pDrawable->x;
+ yorg = pDrawable->y;
+
+ for (pts = ppt, widths = pwidth, nPts = nspans;
+ nPts--;
+ pts++, widths++)
{
- SPRITE_DEBUG (("GetSpans remove\n"));
- miSpriteRemoveCursor (pDev, pScreen);
- break;
+ if (SPN_OVERLAP(&pCursorInfo->saved,pts->y+yorg,
+ pts->x+xorg,*widths))
+ {
+ SPRITE_DEBUG (("GetSpans remove\n"));
+ miSpriteRemoveCursor (pDev, pScreen);
+ break;
+ }
}
}
}