From aaf787ee5650e77f0bda4dea8e3ba8325e0e6b39 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Wed, 9 Mar 2022 16:01:14 -0500 Subject: types/wlr_touch: uniformize events name --- examples/pointer.c | 12 ++++++------ examples/touch.c | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'examples') diff --git a/examples/pointer.c b/examples/pointer.c index d1dab770..1197386e 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -168,7 +168,7 @@ static void handle_cursor_axis(struct wl_listener *listener, void *data) { static void handle_touch_up(struct wl_listener *listener, void *data) { struct sample_state *sample = wl_container_of(listener, sample, touch_up); - struct wlr_event_touch_up *event = data; + struct wlr_touch_up_event *event = data; struct touch_point *point, *tmp; wl_list_for_each_safe(point, tmp, &sample->touch_points, link) { @@ -178,25 +178,25 @@ static void handle_touch_up(struct wl_listener *listener, void *data) { } } - warp_to_touch(sample, event->device); + warp_to_touch(sample, &event->touch->base); } static void handle_touch_down(struct wl_listener *listener, void *data) { struct sample_state *sample = wl_container_of(listener, sample, touch_down); - struct wlr_event_touch_down *event = data; + struct wlr_touch_down_event *event = data; struct touch_point *point = calloc(1, sizeof(struct touch_point)); point->touch_id = event->touch_id; point->x = event->x; point->y = event->y; wl_list_insert(&sample->touch_points, &point->link); - warp_to_touch(sample, event->device); + warp_to_touch(sample, &event->touch->base); } static void handle_touch_motion(struct wl_listener *listener, void *data) { struct sample_state *sample = wl_container_of(listener, sample, touch_motion); - struct wlr_event_touch_motion *event = data; + struct wlr_touch_motion_event *event = data; struct touch_point *point; wl_list_for_each(point, &sample->touch_points, link) { @@ -207,7 +207,7 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) { } } - warp_to_touch(sample, event->device); + warp_to_touch(sample, &event->touch->base); } static void handle_touch_cancel(struct wl_listener *listener, void *data) { diff --git a/examples/touch.c b/examples/touch.c index 5984c500..765b41aa 100644 --- a/examples/touch.c +++ b/examples/touch.c @@ -93,7 +93,7 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { } static void touch_down_notify(struct wl_listener *listener, void *data) { - struct wlr_event_touch_motion *event = data; + struct wlr_touch_motion_event *event = data; struct touch_state *tstate = wl_container_of(listener, tstate, down); struct sample_state *sample = tstate->sample; struct touch_point *point = calloc(1, sizeof(struct touch_point)); @@ -104,7 +104,7 @@ static void touch_down_notify(struct wl_listener *listener, void *data) { } static void touch_up_notify(struct wl_listener *listener, void *data ) { - struct wlr_event_touch_up *event = data; + struct wlr_touch_up_event *event = data; struct touch_state *tstate = wl_container_of(listener, tstate, up); struct sample_state *sample = tstate->sample; struct touch_point *point, *tmp; @@ -117,7 +117,7 @@ static void touch_up_notify(struct wl_listener *listener, void *data ) { } static void touch_motion_notify(struct wl_listener *listener, void *data) { - struct wlr_event_touch_motion *event = data; + struct wlr_touch_motion_event *event = data; struct touch_state *tstate = wl_container_of(listener, tstate, motion); struct sample_state *sample = tstate->sample; struct touch_point *point; -- cgit v1.2.3