summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-22 12:09:24 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-22 12:13:05 +1000
commit48585bd1e3e98db0f3df1ecc68022510216e00cc (patch)
tree0eb7dc6200849c207877c2befcd84ac30cb7226a /dix
parent4dc91b3e54503a1be555bae5b18f3e52f58be307 (diff)
dix: use the event mask of the grab for TryClientEvents.
A client that grabs for button/key events may not have the ButtonPress/KeyPress mask set and should not receive an event in that case. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix')
-rw-r--r--dix/events.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dix/events.c b/dix/events.c
index 4ddf80237..750546315 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3347,6 +3347,7 @@ CheckPassiveGrabsOnWindow(
{
DeviceIntPtr gdev;
XkbSrvInfoPtr xkbi = NULL;
+ Mask mask;
gdev= grab->modifierDevice;
if (grab->grabtype == GRABTYPE_CORE)
@@ -3461,6 +3462,7 @@ CheckPassiveGrabsOnWindow(
}
xE = &core;
count = 1;
+ mask = grab->eventMask;
} else if (match & XI2_MATCH)
{
rc = EventToXI2((InternalEvent*)event, &xE);
@@ -3472,6 +3474,7 @@ CheckPassiveGrabsOnWindow(
continue;
}
count = 1;
+ mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
} else
{
rc = EventToXI((InternalEvent*)event, &xE, &count);
@@ -3482,6 +3485,7 @@ CheckPassiveGrabsOnWindow(
"(%d, %d).\n", device->name, event->type, rc);
continue;
}
+ mask = grab->eventMask;
}
(*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
@@ -3490,8 +3494,7 @@ CheckPassiveGrabsOnWindow(
{
FixUpEventFromWindow(device, xE, grab->window, None, TRUE);
- TryClientEvents(rClient(grab), device, xE, count,
- GetEventFilter(device, xE),
+ TryClientEvents(rClient(grab), device, xE, count, mask,
GetEventFilter(device, xE), grab);
}