Xi: return BadValue for XI_HierarchyChangd mask on devices.
This mask may only be selected for XIAllDevices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
69a9545d1f
commit
0e66a443a0
|
@ -97,6 +97,13 @@ ProcXISelectEvent(ClientPtr client)
|
|||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
/* hierarchy event mask is not allowed on devices */
|
||||
if (evmask->deviceid != XIAllDevices && evmask->mask_len >= 1)
|
||||
{
|
||||
unsigned char *bits = (unsigned char*)&evmask[1];
|
||||
if (BitIsOn(bits, XI_HierarchyChanged))
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
if ((evmask->mask_len * 4) > XI_LASTEVENT)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user