summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-01-18 19:17:42 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-01-18 19:18:07 +1030
commitd323fd64206ddb4221daa7cf7504daf62c5e7d90 (patch)
tree5f87658a0754d23d7b8ef401e61f6adad0b2ed09
parent883811c2bed9c6fcb706effbf83ddc97518b6f0c (diff)
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.
-rw-r--r--dix/events.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/dix/events.c b/dix/events.c
index c91e73bb4..c3697da88 100644
--- a/dix/events.c
+++ b/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;
}