diff options
Diffstat (limited to 'xorg-server/dix')
-rw-r--r-- | xorg-server/dix/events.c | 52 | ||||
-rw-r--r-- | xorg-server/dix/main.c | 3 |
2 files changed, 4 insertions, 51 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 91966c4a8..db5aab1a9 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -3426,7 +3426,6 @@ CheckPassiveGrabsOnWindow( {
DeviceIntPtr gdev;
XkbSrvInfoPtr xkbi = NULL;
- Mask mask = 0;
gdev= grab->modifierDevice;
if (grab->grabtype == GRABTYPE_CORE)
@@ -3541,9 +3540,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);
@@ -3555,34 +3551,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);
@@ -3593,23 +3561,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);
@@ -3618,7 +3569,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);
}
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c index 0e3a8567a..4c81c4d1b 100644 --- a/xorg-server/dix/main.c +++ b/xorg-server/dix/main.c @@ -228,9 +228,10 @@ int main(int argc, char *argv[], char *envp[]) clients[0] = serverClient;
currentMaxClients = 1;
+ /* Initialize privates before first allocation */
dixResetPrivates();
- /* Initialize server client devPrivates, to be reallocated as
+ /* Initialize server client devPrivates, to be reallocated as
* more client privates are registered
*/
if (!dixAllocatePrivates(&serverClient->devPrivates, PRIVATE_CLIENT))
|