From fc8cfc3a055d8af4ac809799c71f3db0d5246433 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 2 Jun 2009 16:53:41 +1000 Subject: [PATCH] dix: ensure EventIsDeliverable has inputMasks set at all times. For proximity events, the XI2 type is 0 and inputMasks never got set in the preceding condition. As a result, proximity events got never delivered. Signed-off-by: Peter Hutterer --- dix/events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dix/events.c b/dix/events.c index d73487afc..f0bb2b9e1 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2326,7 +2326,7 @@ EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, WindowPtr win) int rc = 0; int filter = 0; int type; - OtherInputMasks *inputMasks = NULL; + OtherInputMasks *inputMasks = wOtherInputMasks(win); xEvent ev; /* XXX: this makes me gag */ @@ -2335,7 +2335,7 @@ EventIsDeliverable(DeviceIntPtr dev, InternalEvent* event, WindowPtr win) ((xGenericEvent*)&ev)->extension = IReqCode; ((xGenericEvent*)&ev)->evtype = type; filter = GetEventFilter(dev, &ev); - if (type && (inputMasks = wOtherInputMasks(win)) && + if (type && inputMasks && ((inputMasks->xi2mask[XIAllDevices][type/8] & filter) || ((inputMasks->xi2mask[XIAllMasterDevices][type/8] & filter) && IsMaster(dev)) || (inputMasks->xi2mask[dev->id][type/8] & filter)))