diff options
Diffstat (limited to 'Xi/xiselectev.c')
-rw-r--r-- | Xi/xiselectev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c index 9dbdea72c..51d9c9928 100644 --- a/Xi/xiselectev.c +++ b/Xi/xiselectev.c @@ -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) { |