aboutsummaryrefslogtreecommitdiff
path: root/backend/libinput/pointer.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-03-28 14:11:39 -0400
committerGitHub <noreply@github.com>2018-03-28 14:11:39 -0400
commit5dd022da1300185780ddf4b70014a6f8f306de85 (patch)
tree331f0e5f7b748387a338b678b625bf5a1ae7f693 /backend/libinput/pointer.c
parent52d621e0979c3b393753d1c67b2b0fd23212ca41 (diff)
parent3813121fefb1734ed2c2537759e6eead1c0d9a74 (diff)
Merge pull request #765 from swaywm/transformed-events
Use libinput transformed events instead of width_mm/height_mm
Diffstat (limited to 'backend/libinput/pointer.c')
-rw-r--r--backend/libinput/pointer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index 8a31d312..9ccda634 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -53,9 +53,8 @@ void handle_pointer_motion_abs(struct libinput_event *event,
wlr_event.device = wlr_dev;
wlr_event.time_msec =
usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
- wlr_event.x_mm = libinput_event_pointer_get_absolute_x(pevent);
- wlr_event.y_mm = libinput_event_pointer_get_absolute_y(pevent);
- libinput_device_get_size(libinput_dev, &wlr_event.width_mm, &wlr_event.height_mm);
+ wlr_event.x = libinput_event_pointer_get_absolute_x_transformed(pevent, 1);
+ wlr_event.y = libinput_event_pointer_get_absolute_y_transformed(pevent, 1);
wlr_signal_emit_safe(&wlr_dev->pointer->events.motion_absolute, &wlr_event);
}