{
struct libinput *libinput = device->base.seat->libinput;
struct motion_params motion;
- int32_t x, y;
int slot;
int seat_slot;
struct libinput_device *base = &device->base;
transform_absolute(device, &point);
touch_notify_touch_down(base, time, slot, seat_slot,
- point.x, point.y);
+ &point);
break;
case EVDEV_ABSOLUTE_MT_MOTION:
if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
transform_absolute(device, &point);
touch_notify_touch_motion(base, time, slot, seat_slot,
- point.x, point.y);
+ &point);
break;
case EVDEV_ABSOLUTE_MT_UP:
if (!(device->seat_caps & EVDEV_DEVICE_TOUCH))
point = device->abs.point;
transform_absolute(device, &point);
- touch_notify_touch_down(base, time, -1, seat_slot,
- point.x, point.y);
+ touch_notify_touch_down(base, time, -1, seat_slot, &point);
break;
case EVDEV_ABSOLUTE_MOTION:
point = device->abs.point;
transform_absolute(device, &point);
- x = point.x;
- y = point.y;
if (device->seat_caps & EVDEV_DEVICE_TOUCH) {
seat_slot = device->abs.seat_slot;
if (seat_slot == -1)
break;
- touch_notify_touch_motion(base, time, -1, seat_slot, x, y);
+ touch_notify_touch_motion(base, time, -1, seat_slot,
+ &point);
} else if (device->seat_caps & EVDEV_DEVICE_POINTER) {
pointer_notify_motion_absolute(base, time, &point);
}
uint32_t time;
int32_t slot;
int32_t seat_slot;
- double x;
- double y;
+ struct device_coords point;
};
static void
LIBINPUT_EVENT_TOUCH_DOWN,
LIBINPUT_EVENT_TOUCH_MOTION);
- return evdev_convert_to_mm(device->abs.absinfo_x, event->x);
+ return evdev_convert_to_mm(device->abs.absinfo_x, event->point.x);
}
LIBINPUT_EXPORT double
LIBINPUT_EVENT_TOUCH_DOWN,
LIBINPUT_EVENT_TOUCH_MOTION);
- return evdev_device_transform_x(device, event->x, width);
+ return evdev_device_transform_x(device, event->point.x, width);
}
LIBINPUT_EXPORT double
LIBINPUT_EVENT_TOUCH_DOWN,
LIBINPUT_EVENT_TOUCH_MOTION);
- return evdev_device_transform_y(device, event->y, height);
+ return evdev_device_transform_y(device, event->point.y, height);
}
LIBINPUT_EXPORT double
LIBINPUT_EVENT_TOUCH_DOWN,
LIBINPUT_EVENT_TOUCH_MOTION);
- return evdev_convert_to_mm(device->abs.absinfo_y, event->y);
+ return evdev_convert_to_mm(device->abs.absinfo_y, event->point.y);
}
struct libinput_source *
uint64_t time,
int32_t slot,
int32_t seat_slot,
- double x,
- double y)
+ const struct device_coords *point)
{
struct libinput_event_touch *touch_event;
.time = time,
.slot = slot,
.seat_slot = seat_slot,
- .x = x,
- .y = y,
+ .point = *point,
};
post_device_event(device, time,
uint64_t time,
int32_t slot,
int32_t seat_slot,
- double x,
- double y)
+ const struct device_coords *point)
{
struct libinput_event_touch *touch_event;
.time = time,
.slot = slot,
.seat_slot = seat_slot,
- .x = x,
- .y = y,
+ .point = *point,
};
post_device_event(device, time,