mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
14
dix/events.c
14
dix/events.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user