diff options
author | Peter Hutterer <peter.hutterer@redhat.com> | 2008-11-28 14:05:58 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-12-01 08:16:57 +1000 |
commit | 71f289f7d1b4fe79f25b229830047e71f50d8610 (patch) | |
tree | 24f626261a3aaa2b6c3d66c42a7d4ea38682a0ff /dix/events.c | |
parent | c910886737bf6ce7a4bd44d2149a1f0a810453d2 (diff) |
dix: Don't deliver XI events from MDs.
Restore the XI 1.x event model: VCP/VCK deliver core events only, SDs device
events only.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Diffstat (limited to 'dix/events.c')
-rw-r--r-- | dix/events.c | 62 |
1 files changed, 20 insertions, 42 deletions
diff --git a/dix/events.c b/dix/events.c index d1dc8edd7..b024d9e87 100644 --- a/dix/events.c +++ b/dix/events.c @@ -2404,31 +2404,29 @@ DeliverDeviceEvents(WindowPtr pWin, xEvent *xE, GrabPtr grab, while (pWin && type != GenericEvent) { - /* First try XI event delivery */ - inputMasks = wOtherInputMasks(pWin); - if (inputMasks && (filter & inputMasks->deliverableEvents[mskidx])) + if (!dev->isMaster) { - - if (inputMasks && (inputMasks->inputEvents[mskidx] & filter)) + inputMasks = wOtherInputMasks(pWin); + if (inputMasks && (filter & inputMasks->deliverableEvents[mskidx])) { - FixUpEventFromWindow(dev, xE, pWin, child, FALSE); - deliveries = DeliverEventsToWindow(dev, pWin, xE, count, - filter, grab, mskidx); - if (deliveries > 0) - return deliveries; - } - if ((deliveries < 0) || - (pWin == stopAt) || - (inputMasks && - (filter & inputMasks->dontPropagateMask[mskidx]))) - return 0; - } + if (inputMasks && (inputMasks->inputEvents[mskidx] & filter)) + { + FixUpEventFromWindow(dev, xE, pWin, child, FALSE); + deliveries = DeliverEventsToWindow(dev, pWin, xE, count, + filter, grab, mskidx); + if (deliveries > 0) + return deliveries; + } - if (dev->isMaster && dev->coreEvents) + if ((deliveries < 0) || + (pWin == stopAt) || + (inputMasks && + (filter & inputMasks->dontPropagateMask[mskidx]))) + return 0; + } + } else { - - /* no XI event delivered. Try core event */ core = *xE; core.u.u.type = XItoCoreType(xE->u.u.type); @@ -3621,28 +3619,10 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, } if (!deliveries) { - if (xE->u.u.type == GenericEvent) - { - /* find evmask for event's extension */ - xGenericEvent* ge = ((xGenericEvent*)xE); - GenericMaskPtr gemask = grab->genericMasks; - - if (!gemask || !gemask->eventMask[GEEXTIDX(ge)]) - return; - - if (GEEventFill(xE)) - GEEventFill(xE)(ge, thisDev, grab->window, grab); - deliveries = TryClientEvents(rClient(grab), thisDev, xE, - count, gemask->eventMask[GEEXTIDX(ge)], - generic_filters[GEEXTIDX(ge)][ge->evtype], - grab); - } else { Mask mask = grab->eventMask; - sendCore = (thisDev->isMaster && thisDev->coreEvents); - /* try core event */ - if (sendCore && grab->coreGrab) + if (thisDev->isMaster) { core = *xE; core.u.u.type = XItoCoreType(xE->u.u.type); @@ -3663,9 +3643,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev, grab); } } - } - - if (!deliveries) + } else { /* try XI event */ if (grabinfo->fromPassiveGrab && |