dix: Only check device events for possible ACLs.

We shouldn't be able to restrict events like Expose, etc. with device based
ACLs. So we just ignore all non-input events when checking for permissions.
This commit is contained in:
Peter Hutterer 2007-08-23 18:02:10 +09:30
commit 88a9828ef9
3 changed files with 36 additions and 6 deletions

View file

@ -1928,8 +1928,10 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent
/* if a is denied, we return 0. This could cause the caller to
* traverse the parent. May be bad! (whot) */
if (!ACDeviceAllowed(pWin, pDev))
if (!ACDeviceAllowed(pWin, pDev, pEvents))
{
return 0;
}
/* CantBeFiltered means only window owner gets the event */
if ((filter == CantBeFiltered) ||
@ -3348,7 +3350,7 @@ DeliverGrabbedEvent(xEvent *xE, DeviceIntPtr thisDev,
}
if (!deliveries)
{
if (ACDeviceAllowed(grab->window, thisDev))
if (ACDeviceAllowed(grab->window, thisDev, xE))
{
if (xE->u.u.type == GenericEvent)
{