mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 18:04:00 +00:00
Report initial calibration parameters.
Where an initial calibration is provided through the Calibration option to the driver, it wasn't being exposed in the 'Evdev Axis Calibration' property. Remedy that... Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
f187badb71
commit
7b285a802b
18
src/evdev.c
18
src/evdev.c
@@ -2413,8 +2413,22 @@ EvdevInitProperty(DeviceIntPtr dev)
|
||||
|
||||
prop_calibration = MakeAtom(EVDEV_PROP_CALIBRATION,
|
||||
strlen(EVDEV_PROP_CALIBRATION), TRUE);
|
||||
rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER, 32,
|
||||
PropModeReplace, 0, NULL, FALSE);
|
||||
if (pEvdev->flags & EVDEV_CALIBRATED) {
|
||||
int calibration[4];
|
||||
|
||||
calibration[0] = pEvdev->calibration.min_x;
|
||||
calibration[1] = pEvdev->calibration.max_x;
|
||||
calibration[2] = pEvdev->calibration.min_y;
|
||||
calibration[3] = pEvdev->calibration.max_y;
|
||||
|
||||
rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER,
|
||||
32, PropModeReplace, 4, calibration,
|
||||
FALSE);
|
||||
} else {
|
||||
rc = XIChangeDeviceProperty(dev, prop_calibration, XA_INTEGER,
|
||||
32, PropModeReplace, 0, NULL,
|
||||
FALSE);
|
||||
}
|
||||
if (rc != Success)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user