The server may retain the recent history of the device motion and do so to a finer granularity than is reported by
DeviceMotionNotify events. The XGetDeviceMotionEvents request makes this history available.The XGetDeviceMotionEvents request returns all events in the motion history buffer that fall between the specified start and stop times, inclusive. If the start time is later than the stop time or if the start time is in the future, no events are returned. If the stop time is in the future, it is equivalent to specifying CurrentTime.
The mode indicates whether the device is reporting absolute positional data (mode= Absolute) or relative motion data (mode=Relative). Some devices allow their mode to be changed via the XSetDeviceMode request. These constants are defined in the file XI.h. The axis_count returns the number of axes or valuators being reported by the device.
XGetDeviceMotionEvents can generate a BadDevice, or BadMatch error.