From 83553e3f6ea06f0076d9d0b7bdf2a193ef2a0d43 Mon Sep 17 00:00:00 2001 From: Jonas Troeger Date: Tue, 31 Mar 2020 22:11:37 +0200 Subject: [PATCH] backends/native: Translate coordinates of absolute motion events The motion events of tablets for example need to be mapped on the selected screen area if the input device is configured to use only a part of the active logical monitor. To achieve this behavior each motion event is transformed using the transformation matrix set for the input device. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1118 --- src/backends/native/meta-seat-native.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/native/meta-seat-native.c b/src/backends/native/meta-seat-native.c index 7e0feab44..9c25d4abf 100644 --- a/src/backends/native/meta-seat-native.c +++ b/src/backends/native/meta-seat-native.c @@ -424,6 +424,9 @@ new_absolute_motion_event (MetaSeatNative *seat, meta_xkb_translate_state (event, seat->xkb, seat->button_state); event->motion.x = x; event->motion.y = y; + meta_input_device_native_translate_coordinates (input_device, stage, + &event->motion.x, + &event->motion.y); event->motion.axes = axes; clutter_event_set_device (event, seat->core_pointer); clutter_event_set_source_device (event, input_device);