summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-02 16:53:41 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-02 16:57:20 +1000
commitfc8cfc3a055d8af4ac809799c71f3db0d5246433 (patch)
tree073a690dc40244d7c5fdfa1bbbd3fcbc6cd2b5b0
parentef9f851057a0ae214be02cb919f1e6634cead20b (diff)
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 <peter.hutterer@who-t.net>
-rw-r--r--dix/events.c4
1 files 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)))