aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Maese <memaese@hotmail.com>2018-12-14 09:42:24 -0600
committerAlex Maese <memaese@hotmail.com>2018-12-21 12:20:48 -0600
commitf5ea393bca7a427c0d97217c67b0be563b28dc19 (patch)
treee4916da17451ef44563d7bcf64f9818b79c01f91
parentd0c940d796418672a2421afe108e01b23b0452c4 (diff)
Remove pointer resource from relative pointer
-rw-r--r--include/wlr/types/wlr_relative_pointer_v1.h1
-rw-r--r--rootston/cursor.c8
-rw-r--r--types/wlr_relative_pointer_v1.c1
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);