mi: added MPX to miSpriteReportDamage

added id field to miCursorInfoPtr, required to pass through to miDC
        core pointer uses mpCursors array as well.
        added miDCBufferRec for future use with MPX

TAG: MPX_BEFORE_MIDC_API_BREAK
This commit is contained in:
Peter Hutterer 2006-11-21 11:26:21 +10:30 • committed by Peter Hutterer
commit 3bad452d12
4 changed files with 147 additions and 65 deletions

View file

@ -158,6 +158,24 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure)
SPRITE_DEBUG(("Damage remove\n"));
miSpriteRemoveCursor (pScreenPriv->cp, pScreen);
}
#ifdef MPX
{
int mpCursorIdx = 0;
while (mpCursorIdx < MAX_DEVICES)
{
miCursorInfoPtr pMPCursor = &pScreenPriv->mpCursors[mpCursorIdx];
if (pMPCursor->isUp &&
RECT_IN_REGION (pScreen, pRegion, &pMPCursor->saved) != rgnOUT)
{
SPRITE_DEBUG(("Damage remove MPX\n"));
miSpriteRemoveCursor(pMPCursor, pScreen);
}
mpCursorIdx++;
}
}
#endif
}
/*
@ -266,6 +284,7 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs)
{
miCursorInfoPtr cursor = &(pScreenPriv->mpCursors[mpCursorIdx]);
cursor->id = mpCursorIdx;
cursor->pCursor = NULL;
cursor->x = 0;
cursor->y = 0;
@ -285,6 +304,10 @@ miSpriteInitialize (pScreen, cursorFuncs, screenFuncs)
mpCursorIdx++;
}
/* virtual core pointer has id 1, we might as well save the memory */
xfree(pScreenPriv->cp);
pScreenPriv->cp = &(pScreenPriv->mpCursors[1]);
#endif
return TRUE;