summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-03-23 15:19:47 -0400
committerAdam Jackson <ajax@redhat.com>2009-03-23 15:19:47 -0400
commit4ab93f05664890ff6738ef1089bcd956ce3f06e9 (patch)
tree0c810c80d4d0989b5ec5db85ad4a9ae997b63d63 /mi
parentd698e62690e0a52fa537f1cd792cab7a5b1bafdf (diff)
misprite: In SourceValidate, check that it's a Window first
It almost never is. However, you have _lots_ of input devices now, and walking them all on every Composite operation is not the cheapest thing in the world.
Diffstat (limited to 'mi')
-rw-r--r--mi/misprite.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/mi/misprite.c b/mi/misprite.c
index 1cf643a13..7db4c485a 100644
--- a/mi/misprite.c
+++ b/mi/misprite.c
@@ -422,23 +422,24 @@ miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width,
SCREEN_PROLOGUE (pScreen, SourceValidate);
- pScreenPriv = (miSpriteScreenPtr)dixLookupPrivate(&pScreen->devPrivates,
- miSpriteScreenKey);
-
- for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
+ if (pDrawable->type == DRAWABLE_WINDOW)
{
- if (DevHasCursor(pDev))
- {
- pCursorInfo = MISPRITE(pDev);
- if (pDrawable->type == DRAWABLE_WINDOW && pCursorInfo->isUp &&
- pCursorInfo->pScreen == pScreen &&
- ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y,
- x, y, width, height))
- {
- SPRITE_DEBUG (("SourceValidate remove\n"));
- miSpriteRemoveCursor (pDev, pScreen);
- }
- }
+ pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey);
+
+ for(pDev = inputInfo.devices; pDev; pDev = pDev->next)
+ {
+ if (DevHasCursor(pDev))
+ {
+ pCursorInfo = MISPRITE(pDev);
+ if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen &&
+ ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y,
+ x, y, width, height))
+ {
+ SPRITE_DEBUG (("SourceValidate remove\n"));
+ miSpriteRemoveCursor (pDev, pScreen);
+ }
+ }
+ }
}
if (pScreen->SourceValidate)