dix: remove inputInfo.pointer refernce in EventSelectForWindow

If the window being changed is set as the motion hint window for any device,
the device's motion hint window is set to NULL. Which is kinda what the old
code did, except that it did it with only the VCP.
This commit is contained in:
Peter Hutterer 2008-01-18 19:17:42 +10:30
parent 883811c2be
commit d323fd6420

View File

@ -4202,6 +4202,7 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
{
Mask check;
OtherClients * others;
DeviceIntPtr dev;
int rc;
if (mask & ~AllEventMasks)
@ -4268,11 +4269,14 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask)
return BadAlloc;
}
maskSet:
if ((inputInfo.pointer->valuator->motionHintWindow == pWin) &&
(mask & PointerMotionHintMask) &&
!(check & PointerMotionHintMask) &&
!inputInfo.pointer->deviceGrab.grab) /* VCP shouldn't have deviceGrab */
inputInfo.pointer->valuator->motionHintWindow = NullWindow;
if ((mask & PointerMotionHintMask) && !(check & PointerMotionHintMask))
{
for (dev = inputInfo.devices; dev; dev = dev->next)
{
if (dev->valuator && dev->valuator->motionHintWindow == pWin)
dev->valuator->motionHintWindow = NullWindow;
}
}
RecalculateDeliverableEvents(pWin);
return Success;
}