From f5ea393bca7a427c0d97217c67b0be563b28dc19 Mon Sep 17 00:00:00 2001 From: Alex Maese Date: Fri, 14 Dec 2018 09:42:24 -0600 Subject: Remove pointer resource from relative pointer --- include/wlr/types/wlr_relative_pointer_v1.h | 1 - rootston/cursor.c | 8 +++++++- types/wlr_relative_pointer_v1.c | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/wlr/types/wlr_relative_pointer_v1.h b/include/wlr/types/wlr_relative_pointer_v1.h index 1fd6e610..6f2e0878 100644 --- a/include/wlr/types/wlr_relative_pointer_v1.h +++ b/include/wlr/types/wlr_relative_pointer_v1.h @@ -54,7 +54,6 @@ struct wlr_relative_pointer_manager_v1 { struct wlr_relative_pointer_v1 { struct wl_resource *resource; struct wlr_seat *seat; - struct wl_resource *pointer; struct wl_list link; // wlr_relative_pointer_manager_v1::relative_pointers struct { diff --git a/rootston/cursor.c b/rootston/cursor.c index e34fe4b2..ba8d0860 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -327,7 +327,13 @@ static void notify_relative_motion(struct roots_seat *seat, uint64_t time_msec, wlr_relative_pointer_v1_send_relative_motion(pointer, time_msec, dx, dy, dx_unaccel, dy_unaccel); - wl_pointer_send_frame(pointer->pointer); + } + + wl_resource_for_each(resource, &client->pointers) { + if (wlr_seat_client_from_pointer_resource(resource) == NULL) { + continue; + } + wl_pointer_send_frame(resource); } } diff --git a/types/wlr_relative_pointer_v1.c b/types/wlr_relative_pointer_v1.c index ef937829..e5568f5f 100644 --- a/types/wlr_relative_pointer_v1.c +++ b/types/wlr_relative_pointer_v1.c @@ -99,7 +99,6 @@ static void relative_pointer_manager_v1_handle_get_relative_pointer(struct wl_cl relative_pointer->resource = relative_pointer_resource; relative_pointer->seat = seat_client->seat; - relative_pointer->pointer = pointer; wl_signal_init(&relative_pointer->events.destroy); -- cgit v1.2.3