mi: remove core pointer special handling. No event has core pointer as

device now.

dix:    zero pSprite memory, stop segfaults on server restart.
This commit is contained in:
Peter Hutterer 2007-01-11 14:05:39 +10:30 committed by Peter Hutterer
parent ea82333dc1
commit 5e2f8dee63
2 changed files with 5 additions and 6 deletions

View File

@ -2172,7 +2172,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, xoff, yoff);
/* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
if ((grab = inputInfo.pointer->grab) && grab->confineTo) {
if ((grab = pDev->grab) && grab->confineTo) {
if (grab->confineTo->drawable.pScreen
!= pSprite->hotPhys.pScreen)
pSprite->hotPhys.x = pSprite->hotPhys.y = 0;
@ -3902,6 +3902,7 @@ ProcGrabPointer(ClientPtr client)
oldCursor = grab->cursor;
}
tempGrab.cursor = cursor;
/* FIXME: refcnt?? */
tempGrab.resource = client->clientAsMask;
tempGrab.ownerEvents = stuff->ownerEvents;
tempGrab.eventMask = stuff->eventMask;
@ -3958,7 +3959,7 @@ ProcChangeActivePointerGrab(ClientPtr client)
grab->cursor = newCursor;
if (newCursor)
newCursor->refcnt++;
PostNewCursor(inputInfo.pointer);
PostNewCursor(device);
if (oldCursor)
FreeCursor(oldCursor, (Cursor)0);
grab->eventMask = stuff->eventMask;
@ -4213,6 +4214,7 @@ InitSprite(DeviceIntPtr pDev, Bool hasCursor)
SpritePtr pSprite = (SpritePtr)xalloc(sizeof(SpriteRec));
if (!pSprite)
FatalError("failed to allocate sprite struct");
memset(pSprite, 0, sizeof(SpriteRec));
pSprite->hot.pScreen = pSprite->hotPhys.pScreen = (ScreenPtr)NULL;
pSprite->win = NullWindow;
pSprite->current = NullCursor;

View File

@ -235,10 +235,7 @@ mieqProcessInputEvents()
* Use dev to get the correct processing function but supply
* e->pDev to pass the correct device
*/
if (e->pDev->isMPDev)
dev->public.processInputProc(e->event, e->pDev, e->nevents);
else
dev->public.processInputProc(e->event, dev, e->nevents);
dev->public.processInputProc(e->event, e->pDev, e->nevents);
}
/* Update the sprite now. Next event may be from different device. */