mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-09 23:22:22 +00:00
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:
parent
b1bbdf464d
commit
3bad452d12
4 changed files with 147 additions and 65 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue