aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Maese <memaese@hotmail.com>2019-01-02 13:06:37 -0600
committerAlex Maese <memaese@hotmail.com>2019-01-02 13:06:37 -0600
commit78caed0c99f64e6192778ea90371848323f72379 (patch)
tree54c5d287dd7ff1ad3e158a88d5a77fdbee68d58a
parent8b97c20d01a869497d5e0545319597b3b57e79c2 (diff)
Only send relative events to the focused client in rootston
-rw-r--r--rootston/cursor.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index ffb38816..1fdf1dbb 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -317,12 +317,15 @@ static void notify_relative_motion(struct roots_seat *seat, uint64_t time_msec,
struct wlr_relative_pointer_v1 *pointer;
wl_list_for_each(pointer, &relative_pointer_manager->relative_pointers, link) {
- if (seat->seat != pointer->seat) {
- continue;
+ struct wlr_seat_client *relative_pointer_client =
+ wlr_seat_client_from_pointer_resource(pointer->pointer);
+
+ if (seat->seat == pointer->seat &&
+ client == relative_pointer_client) {
+ wlr_relative_pointer_v1_send_relative_motion(pointer,
+ time_msec, dx, dy, dx_unaccel, dy_unaccel);
}
- wlr_relative_pointer_v1_send_relative_motion(pointer, time_msec,
- dx, dy, dx_unaccel, dy_unaccel);
}
}