Xi: XISetEventMask needs to clear the mask if len is 0
zero-length masks are supposed to clear the device's mask. ProcXISelectEvents passes these masks through directly, so we need to clear the bits here if such a mask is supplied. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
22b4ac44e4
commit
fcf0c0b8f3
|
@ -2167,6 +2167,9 @@ XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
|
||||||
others= wOtherInputMasks(win)->inputClients;
|
others= wOtherInputMasks(win)->inputClients;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!len)
|
||||||
|
memset(others->xi2mask[dev->id], 0, sizeof(others->xi2mask[dev->id]));
|
||||||
|
else
|
||||||
memcpy(others->xi2mask[dev->id], mask, len);
|
memcpy(others->xi2mask[dev->id], mask, len);
|
||||||
|
|
||||||
RecalculateDeviceDeliverableEvents(win);
|
RecalculateDeviceDeliverableEvents(win);
|
||||||
|
|
Loading…
Reference in New Issue