[mutter/gnome-3-36] backends/native: Translate coordinates of absolute motion events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-36] backends/native: Translate coordinates of absolute motion events
- Date: Tue, 7 Apr 2020 18:38:56 +0000 (UTC)
commit 83553e3f6ea06f0076d9d0b7bdf2a193ef2a0d43
Author: Jonas Troeger <jonas troeger-mail de>
Date: Tue Mar 31 22:11:37 2020 +0200
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]