I think the XIDeviceEvent.sourceid would tell you from which device it originates. The XIDeviceEvent.deviceid member would be set to the master device, which might break things in a straight conversion.
I think the XIDeviceEvent. sourceid would tell you from which device it originates. The XIDeviceEvent. deviceid member would be set to the master device, which might break things in a straight conversion.