aboutsummaryrefslogtreecommitdiff
path: root/tinywl
diff options
context:
space:
mode:
authorSimon Zeni <simon@bl4ckb0ne.ca>2022-03-09 14:52:27 -0500
committerKirill Primak <vyivel@eclair.cafe>2022-03-17 18:16:14 +0000
commitbd6c000d142fe6a8e893f1cdd2d5eb0b9d2ac7b8 (patch)
treeb29050c0fe2962076b92ffc124cfdc1c3ba8f8f2 /tinywl
parent96ccc50c5753346e852625fe37418a54386c7804 (diff)
types/wlr_pointer: uniformize events name
Diffstat (limited to 'tinywl')
-rw-r--r--tinywl/tinywl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/tinywl/tinywl.c b/tinywl/tinywl.c
index e21d4734..fae16ac0 100644
--- a/tinywl/tinywl.c
+++ b/tinywl/tinywl.c
@@ -458,13 +458,13 @@ static void server_cursor_motion(struct wl_listener *listener, void *data) {
* pointer motion event (i.e. a delta) */
struct tinywl_server *server =
wl_container_of(listener, server, cursor_motion);
- struct wlr_event_pointer_motion *event = data;
+ struct wlr_pointer_motion_event *event = data;
/* The cursor doesn't move unless we tell it to. The cursor automatically
* handles constraining the motion to the output layout, as well as any
* special configuration applied for the specific input device which
* generated the event. You can pass NULL for the device if you want to move
* the cursor around without any input. */
- wlr_cursor_move(server->cursor, event->device,
+ wlr_cursor_move(server->cursor, &event->pointer->base,
event->delta_x, event->delta_y);
process_cursor_motion(server, event->time_msec);
}
@@ -479,8 +479,9 @@ static void server_cursor_motion_absolute(
* emits these events. */
struct tinywl_server *server =
wl_container_of(listener, server, cursor_motion_absolute);
- struct wlr_event_pointer_motion_absolute *event = data;
- wlr_cursor_warp_absolute(server->cursor, event->device, event->x, event->y);
+ struct wlr_pointer_motion_absolute_event *event = data;
+ wlr_cursor_warp_absolute(server->cursor, &event->pointer->base, event->x,
+ event->y);
process_cursor_motion(server, event->time_msec);
}
@@ -489,7 +490,7 @@ static void server_cursor_button(struct wl_listener *listener, void *data) {
* event. */
struct tinywl_server *server =
wl_container_of(listener, server, cursor_button);
- struct wlr_event_pointer_button *event = data;
+ struct wlr_pointer_button_event *event = data;
/* Notify the client with pointer focus that a button press has occurred */
wlr_seat_pointer_notify_button(server->seat,
event->time_msec, event->button, event->state);
@@ -511,7 +512,7 @@ static void server_cursor_axis(struct wl_listener *listener, void *data) {
* for example when you move the scroll wheel. */
struct tinywl_server *server =
wl_container_of(listener, server, cursor_axis);
- struct wlr_event_pointer_axis *event = data;
+ struct wlr_pointer_axis_event *event = data;
/* Notify the client with pointer focus of the axis event. */
wlr_seat_pointer_notify_axis(server->seat,
event->time_msec, event->orientation, event->delta,