diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2022-03-09 14:52:27 -0500 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-03-17 18:16:14 +0000 |
commit | bd6c000d142fe6a8e893f1cdd2d5eb0b9d2ac7b8 (patch) | |
tree | b29050c0fe2962076b92ffc124cfdc1c3ba8f8f2 /examples/pointer.c | |
parent | 96ccc50c5753346e852625fe37418a54386c7804 (diff) |
types/wlr_pointer: uniformize events name
Diffstat (limited to 'examples/pointer.c')
-rw-r--r-- | examples/pointer.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/pointer.c b/examples/pointer.c index bf3701a4..af14178c 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -112,8 +112,8 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { static void handle_cursor_motion(struct wl_listener *listener, void *data) { struct sample_state *sample = wl_container_of(listener, sample, cursor_motion); - struct wlr_event_pointer_motion *event = data; - wlr_cursor_move(sample->cursor, event->device, event->delta_x, + struct wlr_pointer_motion_event *event = data; + wlr_cursor_move(sample->cursor, &event->pointer->base, event->delta_x, event->delta_y); } @@ -121,19 +121,19 @@ static void handle_cursor_motion_absolute(struct wl_listener *listener, void *data) { struct sample_state *sample = wl_container_of(listener, sample, cursor_motion_absolute); - struct wlr_event_pointer_motion_absolute *event = data; + struct wlr_pointer_motion_absolute_event *event = data; sample->cur_x = event->x; sample->cur_y = event->y; - wlr_cursor_warp_absolute(sample->cursor, event->device, sample->cur_x, - sample->cur_y); + wlr_cursor_warp_absolute(sample->cursor, &event->pointer->base, + sample->cur_x, sample->cur_y); } static void handle_cursor_button(struct wl_listener *listener, void *data) { struct sample_state *sample = wl_container_of(listener, sample, cursor_button); - struct wlr_event_pointer_button *event = data; + struct wlr_pointer_button_event *event = data; float (*color)[4]; if (event->state == WLR_BUTTON_RELEASED) { @@ -150,7 +150,7 @@ static void handle_cursor_button(struct wl_listener *listener, void *data) { static void handle_cursor_axis(struct wl_listener *listener, void *data) { struct sample_state *sample = wl_container_of(listener, sample, cursor_axis); - struct wlr_event_pointer_axis *event = data; + struct wlr_pointer_axis_event *event = data; for (size_t i = 0; i < 3; ++i) { sample->default_color[i] += event->delta > 0 ? -0.05f : 0.05f; |