Remove width_mm from wlr_touch events

This commit is contained in:
Drew DeVault 2018-03-28 11:04:40 -04:00
parent a35a5786b0
commit 324b9d910d
10 changed files with 37 additions and 46 deletions

View file

@ -217,8 +217,8 @@ static void handle_touch_down(struct wl_listener *listener, void *data) {
struct wlr_event_touch_down *event = data;
struct touch_point *point = calloc(1, sizeof(struct touch_point));
point->touch_id = event->touch_id;
point->x = event->x_mm / event->width_mm;
point->y = event->y_mm / event->height_mm;
point->x = event->x;
point->y = event->y;
wl_list_insert(&sample->touch_points, &point->link);
warp_to_touch(sample, event->device);
@ -232,8 +232,8 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) {
struct touch_point *point;
wl_list_for_each(point, &sample->touch_points, link) {
if (point->touch_id == event->touch_id) {
point->x = event->x_mm / event->width_mm;
point->y = event->y_mm / event->height_mm;
point->x = event->x;
point->y = event->y;
break;
}
}