aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorIlia Bozhinov <ammen99@gmail.com>2020-09-04 00:08:45 +0200
committerSimon Ser <contact@emersion.fr>2020-09-04 10:13:35 +0200
commitefe6414640aa15cfad975dec3db427936c0450a4 (patch)
tree96e560fed2463760f35ec11d1e2eb1e3331585e5 /backend
parenta9cbfd950e83df2053474f50f7d12cf79dd74d74 (diff)
wayland: emit relative pointer events only for current pointer
Diffstat (limited to 'backend')
-rw-r--r--backend/wayland/seat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/wayland/seat.c b/backend/wayland/seat.c
index d19744d8..71e04de6 100644
--- a/backend/wayland/seat.c
+++ b/backend/wayland/seat.c
@@ -450,6 +450,9 @@ static void relative_pointer_handle_relative_motion(void *data,
wl_fixed_t dy_unaccel) {
struct wlr_wl_input_device *input_device = data;
struct wlr_input_device *wlr_dev = &input_device->wlr_input_device;
+ if (pointer_get_wl(wlr_dev->pointer) != input_device->backend->current_pointer) {
+ return;
+ }
uint64_t time_usec = (uint64_t)utime_hi << 32 | utime_lo;