[PATCH libinput 7/8] evdev: make evdev_transform_absolute available within libinput

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 1 17:46:31 PST 2015


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev.c | 14 +++++++-------
 src/evdev.h |  4 ++++
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index d56a470..5a73340 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -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;
diff --git a/src/evdev.h b/src/evdev.h
index 1a02963..d7b372f 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -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);
-- 
2.5.0



More information about the wayland-devel mailing list