summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-07-01 23:46:53 -0400
committerKeith Packard <keithp@keithp.com>2010-07-01 23:46:53 -0400
commit69b2b5c85ec079ef49f84722daa5f148cedc2e1b (patch)
tree765156d03f4b5a47f77fb7bfe77ac319aabd3229 /dix
parentb90faa71567c4461b28515756ba5c1e6286dda16 (diff)
parent14327858391ebe929b806efb53ad79e789361883 (diff)
Merge remote branch 'whot/for-keith'
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c2
-rw-r--r--dix/events.c52
2 files changed, 3 insertions, 51 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 034d5e6d2..ac5806a28 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -1239,7 +1239,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
if (!dev)
return FALSE;
- if (numAxes >= MAX_VALUATORS)
+ if (numAxes > MAX_VALUATORS)
{
LogMessage(X_WARNING,
"Device '%s' has %d axes, only using first %d.\n",
diff --git a/dix/events.c b/dix/events.c
index ae9847c93..e1c3d0a02 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3420,7 +3420,6 @@ CheckPassiveGrabsOnWindow(
{
DeviceIntPtr gdev;
XkbSrvInfoPtr xkbi = NULL;
- Mask mask = 0;
gdev= grab->modifierDevice;
if (grab->grabtype == GRABTYPE_CORE)
@@ -3535,9 +3534,6 @@ CheckPassiveGrabsOnWindow(
}
xE = &core;
count = 1;
- mask = grab->eventMask;
- if (grab->ownerEvents)
- mask |= pWin->eventMask;
} else if (match & XI2_MATCH)
{
rc = EventToXI2((InternalEvent*)event, &xE);
@@ -3549,34 +3545,6 @@ CheckPassiveGrabsOnWindow(
continue;
}
count = 1;
-
- /* FIXME: EventToXI2 returns NULL for enter events, so
- * dereferencing the event is bad. Internal event types are
- * aligned with core events, so the else clause is valid.
- * long-term we should use internal events for enter/focus
- * as well */
- if (xE)
- mask = grab->xi2mask[device->id][((xGenericEvent*)xE)->evtype/8];
- else if (event->type == XI_Enter || event->type == XI_FocusIn)
- mask = grab->xi2mask[device->id][event->type/8];
-
- if (grab->ownerEvents && wOtherInputMasks(grab->window))
- {
- InputClientsPtr icp =
- wOtherInputMasks(grab->window)->inputClients;
-
- while(icp)
- {
- if (rClient(icp) == rClient(grab))
- {
- int evtype = (xE) ? ((xGenericEvent*)xE)->evtype : event->type;
- mask |= icp->xi2mask[device->id][evtype/8];
- break;
- }
-
- icp = icp->next;
- }
- }
} else
{
rc = EventToXI((InternalEvent*)event, &xE, &count);
@@ -3587,23 +3555,6 @@ CheckPassiveGrabsOnWindow(
"(%d, %d).\n", device->name, event->type, rc);
continue;
}
- mask = grab->eventMask;
- if (grab->ownerEvents && wOtherInputMasks(grab->window))
- {
- InputClientsPtr icp =
- wOtherInputMasks(grab->window)->inputClients;
-
- while(icp)
- {
- if (rClient(icp) == rClient(grab))
- {
- mask |= icp->mask[device->id];
- break;
- }
-
- icp = icp->next;
- }
- }
}
(*grabinfo->ActivateGrab)(device, grab, currentTime, TRUE);
@@ -3612,7 +3563,8 @@ CheckPassiveGrabsOnWindow(
{
FixUpEventFromWindow(device, xE, grab->window, None, TRUE);
- TryClientEvents(rClient(grab), device, xE, count, mask,
+ TryClientEvents(rClient(grab), device, xE, count,
+ GetEventFilter(device, xE),
GetEventFilter(device, xE), grab);
}