mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Remove width_mm from wlr_touch events
This commit is contained in:
parent
a35a5786b0
commit
324b9d910d
10 changed files with 37 additions and 46 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue