tablet: use our absinfo_x/y struct instead of the libevdev one
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 14 Jun 2024 00:36:59 +0000 (10:36 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 5 Nov 2024 02:05:05 +0000 (12:05 +1000)
device->abs.absinfo_x/y points to the x/y axis we want to use and
that axis is used in all the evdev helper function. For consistency
use that one here too.

This is for consistency only and has no effect on tablet devices, the
only time this isn't ABS_X/Y is on multitouch devices where that points to
ABS_MT_POSITION_X/Y.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1013>

src/evdev-tablet.c

index 5a458582fed5d1e79b78c97e74541b3535720a18..fe5db8e07520a8fca010d0940cf406d1a7b1569f 100644 (file)
@@ -455,7 +455,7 @@ tablet_update_xy(struct tablet_dispatch *tablet,
 
        if (bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_X) ||
            bit_is_set(tablet->changed_axes, LIBINPUT_TABLET_TOOL_AXIS_Y)) {
-               absinfo = libevdev_get_abs_info(device->evdev, ABS_X);
+               absinfo = device->abs.absinfo_x;
 
                if (tablet->rotation.rotate)
                        value = invert_axis(absinfo);
@@ -464,7 +464,7 @@ tablet_update_xy(struct tablet_dispatch *tablet,
 
                tablet->axes.point.x = value;
 
-               absinfo = libevdev_get_abs_info(device->evdev, ABS_Y);
+               absinfo = device->abs.absinfo_y;
 
                if (tablet->rotation.rotate)
                        value = invert_axis(absinfo);