evdev: make evdev_transform_absolute available within libinput

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2015-12-01 15:46:44 +10:00
parent 70e9fd7874
commit 20db89f5c9
2 changed files with 11 additions and 7 deletions

View file

@ -212,9 +212,9 @@ evdev_device_led_update(struct evdev_device *device, enum libinput_led leds)
(void)i; /* no, we really don't care about the return value */
}
static void
transform_absolute(struct evdev_device *device,
struct device_coords *point)
void
evdev_transform_absolute(struct evdev_device *device,
struct device_coords *point)
{
if (!device->abs.apply_calibration)
return;
@ -340,7 +340,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
seat->slot_map |= 1 << seat_slot;
point = device->mt.slots[slot].point;
transform_absolute(device, &point);
evdev_transform_absolute(device, &point);
touch_notify_touch_down(base, time, slot, seat_slot,
&point);
@ -355,7 +355,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
if (seat_slot == -1)
break;
transform_absolute(device, &point);
evdev_transform_absolute(device, &point);
touch_notify_touch_motion(base, time, slot, seat_slot,
&point);
break;
@ -394,13 +394,13 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
seat->slot_map |= 1 << seat_slot;
point = device->abs.point;
transform_absolute(device, &point);
evdev_transform_absolute(device, &point);
touch_notify_touch_down(base, time, -1, seat_slot, &point);
break;
case EVDEV_ABSOLUTE_MOTION:
point = device->abs.point;
transform_absolute(device, &point);
evdev_transform_absolute(device, &point);
if (device->seat_caps & EVDEV_DEVICE_TOUCH) {
seat_slot = device->abs.seat_slot;

View file

@ -286,6 +286,10 @@ struct evdev_device *
evdev_device_create(struct libinput_seat *seat,
struct udev_device *device);
void
evdev_transform_absolute(struct evdev_device *device,
struct device_coords *point);
int
evdev_device_init_pointer_acceleration(struct evdev_device *device,
struct motion_filter *filter);