From d323fd64206ddb4221daa7cf7504daf62c5e7d90 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Jan 2008 19:17:42 +1030 Subject: [PATCH] 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. --- dix/events.c | 14 +++++++++----- 1 file 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; }