input: Make pointer grab motion callbacks take an event struct

Instead of only passing absolute pointer coordinates, effectively
loosing motion event data, pass a struct that can potentially contain
different types of motion events, currently being absolute and relative.

A helper function to get resulting absolute coordinates was added for
when previous callbacks simply used the (x, y) coordinates.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
diff --git a/src/data-device.c b/src/data-device.c
index 66c4c7a..d3ead5f 100644
--- a/src/data-device.c
+++ b/src/data-device.c
@@ -334,7 +334,7 @@
 
 static void
 drag_grab_motion(struct weston_pointer_grab *grab, uint32_t time,
-		 wl_fixed_t x, wl_fixed_t y)
+		 struct weston_pointer_motion_event *event)
 {
 	struct weston_pointer_drag *drag =
 		container_of(grab, struct weston_pointer_drag, grab);
@@ -342,7 +342,7 @@
 	float fx, fy;
 	wl_fixed_t sx, sy;
 
-	weston_pointer_move(pointer, x, y);
+	weston_pointer_move(pointer, event);
 
 	if (drag->base.icon) {
 		fx = wl_fixed_to_double(pointer->x) + drag->base.dx;